Example #1
0
 public void GetReady()
 {
     fairy.gainedPoints.gameObject.SetActive(false);
     rgb.isKinematic = true;
     rgb.velocity    = Vector2.zero;
     fairy.transform.Rotate(0, 91, 0);
     fairy.attackArea.gameObject.SetActive(false);
     fairy.GetComponent <BoxCollider2D>().enabled = false;
     fairy.dominoCollider.gameObject.SetActive(false);
     fairy.transform.localScale = new Vector3(fairy.transform.localScale.x, fairy.transform.localScale.y, Math.Abs(fairy.transform.localScale.z));
     CurrentAction = Wait;
 }
Example #2
0
 private void Start()
 {
     playerSFX  = GetComponent <PlayerSFX>();
     player     = GetComponent <Player>();
     cc         = GetComponent <ColorChange>();
     checkpoint = transform.position;
     try
     {
         fairycc = fairy.GetComponent <ColorChange>();
     } catch (Exception e)
     {
         Debug.Log("No Fairy in scene");
     }
 }
Example #3
0
 public void Enter(Fairy currentFairy)
 {
     fairy         = currentFairy;
     rgb           = fairy.GetComponent <Rigidbody2D>();
     CurrentAction = GetReady;
 }