void Awake() { bball = Resources.Load <BlueBall>("BlueWarrior"); wball = Resources.Load <WhiteBall>("WhiteWarrior"); panel = transform.Find("Panel").gameObject; square = Resources.Load <Square>("Square"); triangle = Resources.Load <Triangle>("Triangle"); star = Resources.Load <Star>("Star"); }
public void CreateWarriors() { BlueBall bball_1 = Instantiate(bball, new Vector3(-6.5f, 3.5f, 0f), Quaternion.identity) as BlueBall; BlueBall bball_2 = Instantiate(bball, new Vector3(-3f, 0f, 0f), Quaternion.identity) as BlueBall; BlueBall bball_3 = Instantiate(bball, new Vector3(-6.5f, -3.5f, 0f), Quaternion.identity) as BlueBall; WhiteBall wball_1 = Instantiate(wball, new Vector3(6.5f, 3.5f, 0f), Quaternion.identity) as WhiteBall; WhiteBall wball_2 = Instantiate(wball, new Vector3(3f, 0f, 0f), Quaternion.identity) as WhiteBall; WhiteBall wball_3 = Instantiate(wball, new Vector3(6.5f, -3.5f, 0f), Quaternion.identity) as WhiteBall; foreach (var warrior in new GameObject[] { bball_1.gameObject, bball_2.gameObject, bball_3.gameObject, wball_1.gameObject, wball_2.gameObject, wball_3.gameObject }) { AddExtensions(warrior); jiEst++; jiEst = jiEst % 3; } }