コード例 #1
0
 /// <summary>
 /// Pri nacteni sceny kontroluje zakladni stav, na zaklade generatoru v okoli a toho
 /// zda se jedna nebo nejedna o main objekt
 /// </summary>
 /// <param name="t"></param>
 protected virtual void CheckOnStart(Tile[] t)
 {
     if (ItemType.Equals(TimelineObject.Present))
     {
         t[0].ObjectOnTile = this;
         t[0].IsOccupied   = true;
         SetVisibleLayer();
         //Debug.Log("PTSObject to tile " + t[0].Position);
     }
     else if (ItemType.Equals(TimelineObject.Past))
     {
         t[1].ObjectOnTile = this;
         t[1].IsOccupied   = true;
         SetInvisibleLayer();
         //Debug.Log("PTSObject to tile " + t[1].Position);
     }
 }
コード例 #2
0
    void Start()
    {
        Tile[] t = Level.GetTile(transform.position);

        if (timeline.Equals(TimelineObject.Present))
        {
            t[0].IsAccessable = false;
        }
        else if (timeline.Equals(TimelineObject.Past))
        {
            t[1].IsAccessable = false;
        }
        else if (timeline.Equals(TimelineObject.Both))
        {
            t[0].IsAccessable = false;
            t[1].IsAccessable = false;
        }

        Debug.Log("Tile " + t[0].Position + " not Avaliable");
    }
コード例 #3
0
    public void ChangeTileAccessability(Vector3 position, TimelineObject to, bool change)
    {
        Tile[] t = GetTile(position);

        /*
         * if (to.Equals(TimelineObject.Present))
         *  t[0].ChangeAccessability(change);
         * else
         *  t[1].ChangeAccessability(change);
         */

        if (to.Equals(TimelineObject.Present))
        {
            t[0].IsOccupied = change;
        }
        else
        {
            t[1].IsOccupied = change;
        }
    }