コード例 #1
0
    // Use this for initialization
    void Start()
    {
        singleton = this;

        hungryBar     = GameObject.FindWithTag("Hungry").GetComponent <Image>();
        currentHungry = 10;
        fillAmount    = (float)currentHungry / maxHungry;
        handleBar();
    }
コード例 #2
0
ファイル: BabyModel.cs プロジェクト: perza/BabySimulator
    /// <summary>
    /// This generates the conditions of the new cow
    /// </summary>
    private void GenerateConditions()
    {
        //:TODO: add individual variation into fuzzy distributions

        // Wellness - Physical conditions
        m_Pain    = new Pain(this);
        m_Sick    = new Sick(this);
        m_Wounded = new Wounded(this);
        m_Damage  = new Damage(this);
        m_Tired   = new Tired(this);
        m_Hungry  = new Hungry(this);
        m_Thirsty = new Thirsty(this);
        m_Dead    = new Dead(this);

        // Contentment - Mental conditions
        m_Anger  = new Angry(this);
        m_Sleepy = new Sleepy(this);
        m_Scared = new Scared(this);
        m_Bored  = new Bored(this);
        m_Lonely = new Lonely(this);
        m_Happy  = new Happy(this);
        m_Eager  = new Eager(this);
    }
コード例 #3
0
 //Or:
 public HungerAttribute(Hungry level)
 {
     _HungerLevel = level;
 }