void spawn() { GameObject obj = Instantiate(m_prefab, Vector3.zero, /*Quaternion.identity*/ Quaternion.Euler(0, 0, Random.Range(0, 360))); T1 cre = obj.GetComponent <T1>(); cre.Initialize(m_evolution.birth(), getSelf()); }
//Spawning: Controls location, initialization, etc. void spawnCreature() { GameObject obj = Instantiate( m_creature_prefab, new Vector3( /*RandomCalc.Rand(new Range<float>(-10f, 10)), * RandomCalc.Rand(new Range<float>(-10f, 10)),*/0, 0, 0 ), Quaternion.Euler(0, 0, Random.Range(0, 360)) ); ResourceFightDNCreature cre = obj.GetComponent <ResourceFightDNCreature>(); cre.Initialize(m_evolution.birth(), this); }