Example #1
0
    private void ExtrudeFace()
    {
        float step = 4 * Time.deltaTime;

        AbilityFace.Parent.position =
            Vector3.MoveTowards(AbilityFace.Parent.position, targetPos, step);
        if (xMove)
        {
            cScript.MoveFace("XPlus", AbilityFace.Parent.position.x);
        }
        else
        {
            cScript.MoveFace("ZPlus", AbilityFace.Parent.position.z);
        }

        if (Vector3.Distance(AbilityFace.Parent.position, targetPos) < .005f)
        {
            cubeChild.transform.SetParent(AbilityFace.transform);
            AbilityFace.Parent.position = targetPos;
            SpawnFace();
            IsActing = false;
            StartCoroutine(DelayedScan());
        }
    }
Example #2
0
    private void RaiseFace()
    {
        float step = 4 * Time.deltaTime;

        AbilityFace.Parent.position =
            Vector3.MoveTowards(AbilityFace.Parent.position, targetHeight, step);
        cScript.MoveFace("YPlus", AbilityFace.Parent.position.y);
        if (Vector3.Distance(AbilityFace.Parent.position, targetHeight) < .005f)
        {
            heightSet = true;
            cubeChild.transform.SetParent(AbilityFace.transform);
            AbilityFace.Parent.position = targetHeight;
            AstarPath.active.Scan();
        }
    }
Example #3
0
 private void RaiseCube()
 {
     cScript.MoveFace("YPlus", AbilityFace.Parent.position.y);
 }