Beispiel #1
0
    private void OnCollisionStay2D(Collision2D collision)
    {
        if (collision.gameObject.layer == 8 && collision.gameObject.GetComponent <Tree_Controller>().burning_ == true)
        {
            current_Ground_State_ = GROUND_STATE.DEATH;
            current_Area_State_   = AREA_STATE.DEATH;
            return;
        }

        if (collision.collider.tag != "BLOCK")
        {
            current_Area_State_ = AREA_STATE.GROUND;
        }

        if (collision.collider.tag == "ZERO")
        {
            current_Level_ = LEVEL.ZERO;
        }
        else if (collision.collider.tag == "PASSABLE")
        {
            current_Level_ = LEVEL.PASSABLE;
        }
        else
        {
            current_Level_ = LEVEL.ELSE;
        }
    }
Beispiel #2
0
 void Jump_Enter()
 {
     current_Area_State_ = AREA_STATE.AIR;
     rigid_Body_.AddForce(Vector2.up * 100.0f * jump_Height_);
     audio_Source_Jump_.clip = jump_Sound_;
     audio_Source_Jump_.Play();
     //audio_Source_.clip = double_Jump_Sound_;
     //audio_Source_.Play();
 }
Beispiel #3
0
 private void OnCollisionExit2D(Collision2D collision)
 {
     current_Area_State_ = AREA_STATE.AIR;
 }
Beispiel #4
0
 public void Set_Positional_State(AREA_STATE state)
 {
     current_Area_State_ = state;
 }
Beispiel #5
0
 void Drop_Enter()
 {
     current_Area_State_ = AREA_STATE.AIR;
     drop_Cooldown_      = 0.75f;
 }