Exemple #1
0
    // Use this for initialization
    IEnumerator Start()
    {
        yield return new WaitForSeconds(.05f);
        Lighton = GetComponent<Light>();
        Player = CharController.Instance.transform.gameObject;
        myMan = Player.GetComponent<RelicManager>();

        if (GuideBehavior == GuideType.WallJump)
        {
            Lighton.color = Color.green;
        }

        if (GuideBehavior == GuideType.DoubleJump)
        {
            Lighton.color = Color.yellow;
        }

        if (GuideBehavior == GuideType.Dash)
        {
            Lighton.color = Color.red;
        }

        if (GuideBehavior == GuideType.Slash)
        {
            Lighton.color = Color.cyan;
        }
    }
 void Start()
 {
     Manager = FindObjectOfType<RelicManager> ();
     Player = CharController.Instance.transform;
     Slash = transform.FindChild ("Canvas/Base/Slash").gameObject;
     DoubleJump = transform.FindChild ("Canvas/Base/Double_Jump").gameObject;
     WallJump = transform.FindChild ("Canvas/Base/Wall_Jump").gameObject;
     Dash = transform.FindChild ("Canvas/Base/Dash").gameObject;
 }