예제 #1
0
    private void Awake()
    {
        feet             = GetComponentInChildren <PlayerFeetScript>();
        rigid            = GetComponent <Rigidbody2D>();
        playerAttributes = GetComponent <PlayerAttributes>();
        playerRenderer   = GetComponent <SpriteRenderer>();

        jumpBehaviour = GameData.jumpBehaviour;
        GameObject.FindGameObjectWithTag("Upgrade").GetComponent <SpriteRenderer>().enabled = GameData.springUpdate;
    }
예제 #2
0
 // Use this for initialization
 void Start()
 {
     rigid      = this.GetComponent <Rigidbody2D>();
     feetScript = feet.GetComponent <PlayerFeetScript>();
 }