コード例 #1
0
 public void MorphApplied(BallTransform morph)
 {
     if (morph.morphName != null)
     {
         StartCoroutine(WaitToBeShown(morph.morphName));
     }
 }
コード例 #2
0
 public void MorphApplied(BallTransform morph)
 {
     if (morph != null)
     {
         morphDisplay.image.sprite = morph.morphIcon;
         morphDisplay.gameObject.SetActive(true);
     }
 }
コード例 #3
0
 void Awake()
 {
     ballController   = GetComponent <BallController> ();
     lightsController = GetComponent <LightsController> ();
     if (currentTransform == null)
     {
         currentTransform = standardTransform;
     }
 }
コード例 #4
0
 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>();
 }
コード例 #5
0
        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);
        }
コード例 #6
0
 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);
         }
     }
 }