void Start() { enableToShoot = true; progressiveColor = renderer.material.color; foreach (Transform item in transform) { gunTransform = item; gunTransform.localPosition = new Vector3(0, -0.75f, 0); } scriptAliensGroup = transform.parent.GetComponent <AliensGroup>(); sprite = GetComponent <AnimationSprite>(); prefabAmmo = (GameObject)Resources.Load("Ammo"); prefabSparks = (GameObject)Resources.Load("Little Sparks"); materialExplosion = (Material)Resources.Load("explosion"); sideBar = GameObject.Find("Side Bar"); }
void Start() { enableToShoot = true; progressiveColor = renderer.material.color; foreach (Transform item in transform) { gunTransform = item; gunTransform.localPosition = new Vector3(0, -0.75f, 0); } scriptAliensGroup = transform.parent.GetComponent<AliensGroup>(); sprite = GetComponent<AnimationSprite>(); prefabAmmo = (GameObject)Resources.Load("Ammo"); prefabSparks = (GameObject)Resources.Load("Little Sparks"); materialExplosion = (Material)Resources.Load("explosion"); sideBar = GameObject.Find("Side Bar"); }