Exemplo n.º 1
0
    IEnumerator EatAnim(TTSID toRemove)
    {
        yield return(new WaitForSeconds(.8f));

        playerAnim.SetBool(5, false);
        toRemove.Remove();
    }
 public GameObjectInitMessage(GameObject go)
 {
     ttsid       = go.GetComponent <TTSID>().id;
     position    = go.transform.localPosition;
     rotation    = go.transform.localRotation;
     parentTTSID = TTSID.Get(go.transform.parent);
     tag         = go.tag;
     name        = go.name;
     prefabID    = TTSPrefabID.Get(go);
 }
Exemplo n.º 3
0
    public void EatFood(float foodValue, TTSID toRemove)
    {
        foodLevel           += foodValue;
        trackedDataAvailable = true;
        GetComponent <TTSID>().trackedDataAvailable = true;

        if (foodLevel > dashFoodCost)
        {
            GetComponentInChildren <MeshRenderer>().material.color = defaultColor;
        }

        playerAnim.SetBool(5, true);
        StartCoroutine(EatAnim(toRemove));
    }
Exemplo n.º 4
0
    public static ushort Get(GameObject go)
    {
        TTSID c = go.GetComponent <TTSID>();

        return(c == null ? (ushort)0 : c.id);
    }
 public GameObjectTDataMessage(Transform target, List <TTS.TDataMessagePart> trackedData)
 {
     this.ttsid       = target.GetComponent <TTSID>().id;
     this.parent      = TTSID.Get(target.parent);
     this.trackedData = trackedData;
 }