Exemplo n.º 1
0
 // Use this for initialization
 void Start()
 {
     dummySpr = GetComponent<SpriteFactory.Sprite> ();
     dummyRb = GetComponent<Rigidbody2D> ();
     playerTrans = GameObject.Find ("Player").GetComponent<Transform> ();
     EHealth = EMaxhealth;
 }
    void Init()
    {
        Health = Maxhealth;

        print ("---Initializing---");
        playerSpr = GetComponent<SpriteFactory.Sprite> ();
        playerRb = GetComponent<Rigidbody2D> ();
        _state = State.Movements;
        groundPos = transform.FindChild ("groundPos").GetComponent<Transform> ();

        _gotHit = false;

        impactTimer = 0f;
        impactTimerMax = .1f;
        invulTimer = 0f;
        invulTimerMax = 1.5f;
        hitTimer = 0f;
        hitTimerMax = .8f;
    }
 // Use this for initialization
 void Start()
 {
     sprite = GetComponent <Sprite> ();
 }