void Split() { GameObject boss = GameObject.Instantiate(Resources.Load("Prefabs/MainCanvas/Megaboid")) as GameObject; RectTransform brt = boss.GetComponent <RectTransform>(); brt.anchoredPosition = ((RectTransform)transform).anchoredPosition; boss.transform.SetParent(Dial.unmaskedLayer, false); Megaboid mb = boss.GetComponent <Megaboid>(); mb.StartClone(); this.bounceLeft = true; mb.bounceLeft = false; thetas.y = bounceVel; thetas.z = -bounceAcc; mb.SetTheta(0, thetas.x); mb.SetTheta(1, -bounceVel); mb.SetTheta(2, bounceAcc); currentState = state.BOUNCING; mb.SetState(state.BOUNCING); float damageTaken = maxHP - hp; mb.SetDamage(damageTaken); mb.RefreshHP(); mb.HandleModeStuff(); foreach (Megaboid boid in bosses) { if (boid != this) { boid.AddBoss(mb); } mb.AddBoss(boid); } AddBoss(mb); }
public void AddBoss(Megaboid meg) { bosses.Add(meg); }
public void SetState(Megaboid.state megState) { currentState = megState; }
public void AddBoss(Megaboid meg) { bosses.Add(meg); }