Example #1
0
    private void Respawn(Kiwi kiwi)
    {
        kiwi.gameObject.SetActive(true);

        //Teleport back to base and reset path
        kiwi.parentTile = this;
        Transform t = kiwi.transform;

        t.parent        = transform;
        t.localPosition = Vector2.zero;

        kiwi.SetPath(CreatePath(EntryPoints.CENTER));
    }
Example #2
0
    private void Create()
    {
        GameObject prefab = GameManager.ConstructionKiwiPrefab;

        int i = LevelData.AvailableColors[Random.Range(0, LevelData.AvailableColors.Length)];
        //Material mat = GameManager.ConstructionKiwiMaterial;

        GameObject obj  = Instantiate(prefab, this.transform);
        Kiwi       kiwi = obj.GetComponent <Kiwi>();

        kiwi.parentTile    = this;
        kiwi.SpawnLocation = this;

        kiwi.SetPath(CreatePath(EntryPoints.CENTER));
    }