Exemplo n.º 1
0
    private void CubeSpawn()
    {
        cubePrefab = GameManager.SharedInstance.matSelect.cubePrefab;

        cubeChild = Instantiate(cubePrefab);
        cScript   = cubeChild.GetComponent <ProceduralCube>();
        cScript.SetInitialPos(AbilityFace.Vertices, AbilityFace._rend.material);
    }
Exemplo n.º 2
0
 private void MoveOutByOne()
 {
     if (cubeChild == null)
     {
         cubeChild = Instantiate(cubePrefab);
         cScript   = cubeChild.GetComponent <ProceduralCube>();
         cScript.SetInitialPos(AbilityFace.Vertices, AbilityFace._rend.material);
     }
     if (cubeChild.transform.parent != null)
     {
         cubeChild.transform.parent = null;
     }
     if (xMove)
     {
         targetPos.x += 1;
     }
     else
     {
         targetPos.z += 1;
     }
     AbilityTimes--;
     IsActing = true;
     GameManager.SharedInstance.AudioManager.PlaySoundEffect(GameManager.SharedInstance.AudioManager.CubeRaiseShort);
 }