Inheritance: InteractiveObject
Ejemplo n.º 1
0
    IEnumerator StartupAnimation()
    {
        for (int i = 0; i < NUM_CUBES; i++)
        {
            HexaCube cube = transform.FindChild("startupAnimation/" + i.ToString()).GetComponent <HexaCube>();
            cube.Spawn(Constants.BLACK);
            cube.transform.FindChild("LookRotation").localScale = Vector3.one * 1.3f;
        }
        yield return(new WaitForSeconds(0.5f));

        transform.FindChild("progressBar").gameObject.SetActive(true);
        transform.FindChild("progressBarBG").gameObject.SetActive(true);

        for (int i = NUM_CUBES - 1; i >= 0; i--)
        {
            HexaCube cube = transform.FindChild("startupAnimation/" + i.ToString()).GetComponent <HexaCube>();
            cube.Despawn();
            cube.Spawn(Constants.WHITE);
            yield return(new WaitForSeconds(0.02f));
        }

        yield return(new WaitForSeconds(0.5f));

        transform.FindChild("progressBarBG").gameObject.SetActive(false);
        transform.FindChild("startupAnimation").gameObject.SetActive(false);

        for (int i = 0; i < NUM_CUBES; i++)
        {
            progressCubes[i].gameObject.SetActive(true);
        }
    }
Ejemplo n.º 2
0
    public void Awake()
    {
        playerActions = GameObject.Find("PlayerActions").GetComponent <PlayerActions>();

        hexaCube = (Object.Instantiate(HexaCubePrefab) as GameObject).GetComponent <HexaCube>();
        hexaCube.transform.parent        = transform;
        hexaCube.transform.localPosition = Vector3.zero;
        hexaCube.gridPlace = this;
        displayTransform   = hexaCube.transform.FindChild("LookRotation");

        targetScale = Vector3.one;
    }
Ejemplo n.º 3
0
    public void Awake()
    {
        playerActions = GameObject.Find("PlayerActions").GetComponent<PlayerActions>();

        hexaCube = (Object.Instantiate(HexaCubePrefab) as GameObject).GetComponent<HexaCube>();
        hexaCube.transform.parent = transform;
        hexaCube.transform.localPosition = Vector3.zero;
        hexaCube.gridPlace = this;
        displayTransform = hexaCube.transform.FindChild("LookRotation");

        targetScale = Vector3.one;
    }
Ejemplo n.º 4
0
 void Awake()
 {
     hex1 = transform.FindChild("rotator/HexaCube1").GetComponent <HexaCube>();
     hex2 = transform.FindChild("rotator/HexaCube2").GetComponent <HexaCube>();
     anim = transform.FindChild("rotator").GetComponent <Animation>();
 }
Ejemplo n.º 5
0
 void Awake()
 {
     hex1 = transform.FindChild("rotator/HexaCube1").GetComponent<HexaCube>();
     hex2 = transform.FindChild("rotator/HexaCube2").GetComponent<HexaCube>();
     anim = transform.FindChild("rotator").GetComponent<Animation>();
 }