Esempio n. 1
0
    // Use this for initialization
    void Start()
    {
        _Animator = GetComponent <Animator>();
        _Animator.Play("popin");
        _FlushBehavior      = _Animator.GetBehaviour <FlushBehavior>();
        _Rigidbody          = GetComponent <Rigidbody2D>();
        _Transform          = GetComponent <Transform>();
        _Rigidbody.bodyType = RigidbodyType2D.Static;

        _GameManager = GameManager.Instance.GetComponent <GameManager>();
        EventManager.StartListening("Tick", () =>
        {
            Ripeness++;
            //  if (Ripeness == UntilRipe / 2)
            //  {
            //      _Transform.localScale = new Vector3(1.5f, 1.5f, 1);
            //  }
            //  if (Ripeness >= UntilRipe)
            //  {
            //      _Transform.localScale = new Vector3(1.5f, 1.5f, 1);
            //      //  _Rigidbody.bodyType = RigidbodyType2D.Dynamic;

            //  }
        });
    }
Esempio n. 2
0
 // Use this for initialization
 void Start()
 {
     _Animator      = GetComponent <Animator>();
     _FlushBehavior = _Animator.GetBehaviour <FlushBehavior>();
     _GameManager   = GameManager.Instance.GetComponent <GameManager>();;
 }