public void MorphApplied(BallTransform morph) { if (morph.morphName != null) { StartCoroutine(WaitToBeShown(morph.morphName)); } }
public void MorphApplied(BallTransform morph) { if (morph != null) { morphDisplay.image.sprite = morph.morphIcon; morphDisplay.gameObject.SetActive(true); } }
void Awake() { ballController = GetComponent <BallController> (); lightsController = GetComponent <LightsController> (); if (currentTransform == null) { currentTransform = standardTransform; } }
public EntityTransform(Camera camera, Player player, Ball ball, Arrow arrow, AI ai) { _camera = camera; _playerTransformPosition = player.GetComponent <PlayerTransform>(); _playerMovable = player.GetComponent <PlayerMovable>(); _ballBaseStats = ball.GetComponent <BallBaseStats>(); _ballMovable = ball.GetComponent <BallMovable>(); _ballTransform = ball.GetComponent <BallTransform>(); _arrowStretchable = arrow.GetComponent <ArrowScretchable>(); _aiMovable = ai.GetComponent <AIMovable>(); }
private void CreateBall(int x, int y) { Transform BallTransform; AddBall addBall = Instantiate(addBallPrefab); addBall.OnCollision += AddBallCollision; BallTransform = addBall.transform; BallTransform.SetParent(gridContainer); BallTransform.localPosition = GetPositionFromModel(x, y); BallTransform.localScale *= stepX; shapes.Add(BallTransform); }
public void ApplyTransform(BallTransform newTransform) { if (newTransform != currentTransform) { currentTransform.Remove(ballController); newTransform.Apply(ballController); currentTransform = newTransform; lightsController.SetLightColor(currentTransform.morphColor); if (currentTransform != standardTransform) { Transform morphEffect = transform.FindChild("ParticleSystems/" + currentTransform.morphEffectName); if (morphEffect != null) { morphEffect.GetComponent <ParticleSystem>().Play(); } HUD.controller.SendMessage("MorphApplied", currentTransform); } } }