示例#1
0
    // Use this for initialization
    void Start()
    {
        //the cklass with the main player animations
        AnimationClass = GetComponent <MainPlayerAnimations>();

        var DamageBar = GameObject.FindGameObjectsWithTag("LiveBar");

        //rigid body control
        rigid = GetComponent <Rigidbody2D>();

        DamageBarAnimation = DamageBar[0];
        liveBar            = DamageBarAnimation.GetComponent("MainPlayerLiveBar") as MainPlayerLiveBar;
    }
示例#2
0
    // Use this for initialization
    void Start()
    {
        //the cklass with the main player animations
        AnimationClass     = GetComponent <MainPlayerAnimations>();
        backgroundPosition = DeadBG.position;
        var DamageBar = GameObject.FindGameObjectsWithTag("LiveBar");

        //rigid body control
        rigid = GetComponent <Rigidbody2D>();

        DamageBarAnimation = DamageBar[0];
        liveBar            = DamageBarAnimation.GetComponent("MainPlayerLiveBar") as MainPlayerLiveBar;


        // liveBar.Damage(totalDamage);
    }
示例#3
0
    // Use this for initialization
    void Start()
    {
        //we use this to flip the sprite
        sprite = GetComponent <SpriteRenderer>();
        //the cklass with the main player animations
        AnimationClass = GetComponent <MainPlayerAnimations>();



        //rigid body control
        rigid = GetComponent <Rigidbody2D>();

        var DamageBar = GameObject.FindGameObjectsWithTag("LiveBar");

        DamageBarAnimation = DamageBar[0];
        liveBar            = DamageBarAnimation.GetComponent("MainPlayerLiveBar") as MainPlayerLiveBar;



        player = GetComponent <Transform>();
    }