Example #1
0
 // Use this for initialization
 void Start()
 {
     _toPosition = _positions[_posNumber];
     _foodUIMove = this.transform.parent.GetComponent <FoodUIMove>();
     _myRect     = this.GetComponent <RectTransform>();
     if (_foodUIMove.SelectFood() != this.gameObject)
     {
         _myRect.GetComponent <Image>().color = new Color(_blackColor, _blackColor, _blackColor, 1.0f);
         _myRect.localScale = new Vector2(_smallScale, _smallScale);
     }
 }
Example #2
0
    // Use this for initialization
    void Start()
    {
        m_Animator      = GetComponent <Animator>();
        m_NavMeshPlayer = transform.parent.GetComponent <NavMeshPlayer>();

        _onTrapFlag = false;
        _trapMax    = GameManager.gameManager.TrapNumber();
        _foodMax    = GameManager.gameManager.FoodNumber();
        _foodUIMove = _foodUI.GetComponent <FoodUIMove>();
        //今選んでいる餌を調べる
        _foodNumber = _foodUIMove.SelectFoodNumber();
        if (_trap != null)
        {
            _trap = _bigTrap.GetComponent <BigTrap>();
        }
    }