Here are the examples of the csharp api UnityEngine.Vector3Int.Max(UnityEngine.Vector3Int, UnityEngine.Vector3Int) taken from open source projects. By voting up you can indicate which examples are most useful and appropriate.
2 Examples
19
View Source File : LoadAsyncScene.cs
License : GNU Affero General Public License v3.0
Project Creator : AugustToko
License : GNU Affero General Public License v3.0
Project Creator : AugustToko
private IEnumerator LoadRandomSceneDarkDebug(string sceneName)
{
GameManager.RandomSceneType = "A";
EventCenter.Broadcast(EventType.BeginLoadScene);
_async = SceneManager.LoadSceneAsync(sceneName);
_async.allowSceneActivation = false;
var loadMapDataDone = false;
// 规模
const int bigMapStep = 5000;
const int playerPointMapStep = 200;
var helper = ResourceLoader.RandomMapTypeDungeon.GetComponent<RandomMapHelper>();
MapBuilder.InitBuilder(ref helper, ref TilemapLevelLite.PlayerRoomBuilder);
MapBuilder.InitBuilder(ref helper, ref TilemapLevelLite.Builder);
yield return TilemapLevelLite.Builder.MakeMapData(async () =>
{
var maxV3 = new Vector3Int(0, 0, 0);
maxV3 = TilemapLevelLite.Builder.WallTop.Aggregate(maxV3, (current, v3) => Vector3Int.Max(v3, current));
// 偏移
maxV3 += new Vector3Int(50, 50, 0);
await TilemapLevelLite.PlayerRoomBuilder.MakeMapData(
() =>
{
TilemapLevelLite.TransferPosPlayerRoom =
TilemapLevelLite.PlayerRoomBuilder.GetRandomPosOnRoad();
TilemapLevelLite.PlayerPos = TilemapLevelLite.PlayerRoomBuilder.GetRandomPosOnRoad();
TilemapLevelLite.TransferPosMainRoom = TilemapLevelLite.Builder.GetRandomPosOnRoad();
loadMapDataDone = true;
},
// 小房间规模 smallMapStep
maxV3, playerPointMapStep);
// 大房间规模 bigMapStep
}, Vector3Int.zero, bigMapStep);
TilemapLevelLite.After = () =>
{
for (var i = 0; i < UnityEngine.Random.Range(3, 5); i++)
{
TilemapLevelLite.bgObj.Add(Instantiate(ResourceLoader.Cloud, Vector3.zero,
Quaternion.Euler(Vector3.zero), UiManager.Instance.gameObject.transform));
}
GameObject.Find("GlobalLight").GetComponent<Light2D>().intensity = 0.2f;
};
while (!_async.isDone)
{
_progressValue = _async.progress < 0.9f ? _async.progress : 1.0f;
_slider.value = _progressValue;
_progress.text = (int) (_slider.value * 100) + " %";
if (_progressValue >= 0.9 && loadMapDataDone)
{
_slider.value = 1.0f;
_progress.text = "按任意键继续";
if (Input.anyKeyDown)
{
SceneUtil.NextSceneName = "";
_async.allowSceneActivation = true;
Resources.UnloadUnusedreplacedets();
GC.Collect();
Destroy(this);
Destroy(gameObject);
}
}
yield return null;
}
}
19
View Source File : UnityEngine_Vector3Int_Wrap.cs
License : MIT License
Project Creator : focus-creative-games
License : MIT License
Project Creator : focus-creative-games
[Puerts.MonoPInvokeCallback(typeof(Puerts.V8FunctionCallback))]
private static void F_Max(IntPtr isolate, IntPtr info, IntPtr self, int paramLen, long data)
{
try
{
{
var argHelper0 = new Puerts.ArgumentHelper((int)data, isolate, info, 0);
var argHelper1 = new Puerts.ArgumentHelper((int)data, isolate, info, 1);
{
var Arg0 = argHelper0.Get<UnityEngine.Vector3Int>(false);
var Arg1 = argHelper1.Get<UnityEngine.Vector3Int>(false);
var result = UnityEngine.Vector3Int.Max(Arg0,Arg1);
Puerts.ResultHelper.Set((int)data, isolate, info, result);
}
}
}
catch (Exception e)
{
Puerts.PuertsDLL.ThrowException(isolate, "c# exception:" + e.Message + ",stack:" + e.StackTrace);
}
}