Пример #1
0
    void Init()
    {
        ideaColor = RandColour();
        thoughts = GetComponent<Thoughts>();
        Starsign = Random.value;

        startPos = transform.position;

        if(Random.value>0.5f) walkOffset.x = -walkOffset.x;
        if(Random.value>0.5f) walkOffset.y = -walkOffset.y;
        if(Random.value>0.5f) walkOffset.z = -walkOffset.z;

        if(Random.value>0.5f) direction = -direction;

        float frequency = Random.Range(0.04f, 0.08f);
        if(Random.value>0.5f) frequency = -frequency;
        foreach(Transform t in transform)
        {
            t.GetComponent<CoolAnimation>().Frequency = frequency;
        }
    }
Пример #2
0
 /// <summary> returns whether or not the creature already has a thought of the given type. </summary>
 public bool HasThought(Thought.ThoughtType type)
 {
     return(Thoughts.Any(existingThought => existingThought.Type == type));
 }