public static void InitializeWithScene() { var settingsGO = GameObject.Find("Settings"); Settings = settingsGO?.GetComponent <TwoStickExampleSettings>(); EnemySpawnSystem.SetupComponentData(); World.Active.GetOrCreateManager <UpdatePlayerHUD>().SetupGameObjects(); }
public void Awake() { Settings = settings; var sceneSwitcher = GameObject.Find("SceneSwitcher"); if (sceneSwitcher != null) { NewGame(); } }
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); }
public static void InitializeWithScene() { var settingsGO = GameObject.Find("Settings"); Settings = settingsGO?.GetComponent <TwoStickExampleSettings>(); }
public void Awake() { Settings = settings; }