Example #1
0
    public void getFloorInfo(SpatialIndex.FLOOR_STATUS state)
    {
        if (checkWithFloor((int)state, (int)SpatialIndex.FLOOR_STATUS.WATER))
        {
            speed = 6.0f;
            //StartCoroutine(drowning());

            waterTime += Time.deltaTime;
            checkIfStillWater(waterTime);

            Debug.Log("GLu glu");
        }
        else if (checkWithFloor((int)state, (int)SpatialIndex.FLOOR_STATUS.LAVA))
        {
            waterTime = 0;
            speed     = 6.0f;
            Debug.Log("AHHH");
            controller.Move(Vector3.up * 50.0f * Time.deltaTime);
        }
        else if (checkWithFloor((int)state, (int)SpatialIndex.FLOOR_STATUS.TRAMPOLIN))
        {
            waterTime = 0;

            Debug.Log("Going Up");
            controller.Move(Vector3.up * 300.0f * Time.deltaTime);
        }
        else
        {
            waterTime = 0;

            speed = 12.0f;
        }
    }
Example #2
0
    public void getFloorInfo(SpatialIndex.FLOOR_STATUS state)
    {
        if (CharacterMove.checkWithFloor((int)state, (int)SpatialIndex.FLOOR_STATUS.LAVA))
        {
            if (CheckIfChangeFloor((int)state))
            {
                changeColor.StartLerpColor(2, Color.red);
            }

            transform.localScale += Vector3.one * Time.deltaTime;
        }
        else if (CharacterMove.checkWithFloor((int)state, (int)SpatialIndex.FLOOR_STATUS.WATER))
        {
            if (CheckIfChangeFloor((int)state))
            {
                changeColor.StartLerpColor(1.2f, Color.blue);
            }


            if (transform.localScale.x >= 0.2f)
            {
                transform.localScale -= Vector3.one * Time.deltaTime / 4;
            }
        }
        else
        {
            if (CheckIfChangeFloor((int)state))
            {
                changeColor.StartLerpColor(1.3f, Color.yellow);
            }
        }
    }
Example #3
0
 public void getFloorInfo(SpatialIndex.FLOOR_STATUS state)
 {
     if (CharacterMove.checkWithFloor((int)state, (int)SpatialIndex.FLOOR_STATUS.LAVA))
     {
         transform.localScale += Vector3.one * Time.deltaTime;
     }
     if (CharacterMove.checkWithFloor((int)state, (int)SpatialIndex.FLOOR_STATUS.WATER))
     {
         transform.localScale -= Vector3.one * Time.deltaTime;
     }
 }
Example #4
0
 public void getFloorInfo(SpatialIndex.FLOOR_STATUS state)
 {
     if (CharacterMove.checkWithFloor((int)state, (int)SpatialIndex.FLOOR_STATUS.LAVA))
     {
         characterMove.speed *= 0.5f;
     }
     if (CharacterMove.checkWithFloor((int)state, (int)SpatialIndex.FLOOR_STATUS.WATER))
     {
         characterMove.speed *= 2f;
     }
 }
Example #5
0
 public void getFloorInfo(SpatialIndex.FLOOR_STATUS state)
 {
     if (checkWithFloor((int)state, (int)SpatialIndex.FLOOR_STATUS.WATER))
     {
         speed = 3.0f;
     }
     else if (checkWithFloor((int)state, (int)SpatialIndex.FLOOR_STATUS.LAVA))
     {
         speed = 15.0f;
     }
     else
     {
         speed = 9.0f;
     }
 }
Example #6
0
 public void GetFloorInfo(SpatialIndex.FLOOR_STATUS state)
 {
     if (CheckWithFloor((int)state, (int)SpatialIndex.FLOOR_STATUS.WATER))
     {
         Speed = 6.0f;
     }
     else if (CheckWithFloor((int)state, (int)SpatialIndex.FLOOR_STATUS.LAVA))
     {
         Speed = 6.0f;
         Controller.Move(Vector3.up * 50.0f * Time.deltaTime);
     }
     else
     {
         Speed = 12.0f;
     }
 }
Example #7
0
 public void getFloorInfo(SpatialIndex.FLOOR_STATUS state)
 {
     if (checkWithFloor((int)state, (int)SpatialIndex.FLOOR_STATUS.WATER))
     {
         speed = 6.0f;
     }
     else if (checkWithFloor((int)state, (int)SpatialIndex.FLOOR_STATUS.LAVA))
     {
         speed = 6.0f;
         Debug.Log("AHHH");
         controller.Move(Vector3.up * 50.0f * Time.deltaTime);
     }
     else
     {
         speed = 12.0f;
     }
 }