コード例 #1
0
ファイル: Malus.cs プロジェクト: YanisGuerault/Trick-Tower
    public void Activate(GameObject piece)
    {
        foreach (GameObject spawn in GameObject.FindGameObjectsWithTag("Spawn Box"))
        {
            SpawnBox box = spawn.GetComponent <SpawnBox>();

            if (box.getLastPieceComponent().player != piece.GetComponent <Piece>().player)
            {
                Activation(box.getLastPiece());
            }
        }
    }
コード例 #2
0
    IEnumerator waitforDestory()
    {
        Boxes[] boxes = FindObjectsOfType(typeof(Boxes)) as Boxes[];

        foreach (Boxes box in boxes)
        {
            Destroy(box.gameObject);
            yield return(new WaitForSeconds(0.2f));
        }


        SpawnBox sb = FindObjectOfType(typeof(SpawnBox)) as SpawnBox;

        sb.SpawnNewBox();

        txtInfo.text = "";
        mask.DOFade(0, 0.5f);
        btnReplay.transform.DOMove(initBtnReplayPos, 0.5f);
        btnReplay.transform.DOScale(0.3f * Vector3.one, 0.5f);

        isPause = false;
    }
コード例 #3
0
 // Use this for initialization
 void Start()
 {
     player   = GameObject.FindWithTag("Player").transform;
     spawnBox = GameObject.Find("CreateBlockPoint").GetComponent <SpawnBox>();
 }
コード例 #4
0
ファイル: Piece.cs プロジェクト: YanisGuerault/Trick-Tower
 public void setSpawner(SpawnBox spawner)
 {
     this.spawner = spawner;
 }