コード例 #1
0
        public static void InitializeWithScene()
        {
            var settingsGO = GameObject.Find("Settings");

            Settings = settingsGO?.GetComponent <TwoStickExampleSettings>();

            EnemySpawnSystem.SetupComponentData();
            World.Active.GetOrCreateManager <UpdatePlayerHUD>().SetupGameObjects();
        }
コード例 #2
0
        public void Awake()
        {
            Settings = settings;
            var sceneSwitcher = GameObject.Find("SceneSwitcher");

            if (sceneSwitcher != null)
            {
                NewGame();
            }
        }
コード例 #3
0
 static float GetCollisionRadius(TwoStickExampleSettings settings, Faction.Type faction)
 {
     // This simply picks the collision radius based on whether the receiver is the player or not.
     // In a real game, this would be much more sophisticated, perhaps with a CollisionRadius component.
     return(faction == Faction.Type.Player ? settings.playerCollisionRadius : settings.enemyCollisionRadius);
 }
コード例 #4
0
        public static void InitializeWithScene()
        {
            var settingsGO = GameObject.Find("Settings");

            Settings = settingsGO?.GetComponent <TwoStickExampleSettings>();
        }
コード例 #5
0
 public void Awake()
 {
     Settings = settings;
 }