示例#1
0
    void Start()
    {
        motor = GetComponent <i_Human_Motor>();
        stats = GetComponent <scr_Stats>();

        pathToTarget     = GetPath();
        timeToNextRandom = Random.Range(_MinRandomRotationTime, _MaxRandomRotationTime);

        _Model.transform.LookAt(_Model.transform.position + scr_Tilemap.Get.DirectionToVector(GetRandomDirection()));
    }
示例#2
0
    void Awake()
    {
        if (reference == null)
        {
            reference = GetComponent <scr_Stats>();
        }
        if (reference == null)
        {
            Destroy(this);
        }

        initTextComponents();
    }
    void Start()
    {
        stats              = GetComponent <scr_Stats>();
        animator           = GetComponentInChildren <i_Human_Animator>();
        animator.OnPickup += Animator_OnPickup;
        animator.OnAttack += Animator_OnAttack;
        animator.OnAnimationTransition += Animator_OnAnimationFinished;

        move_HalfExtents = new Vector3(
            _PlayerWidth / 2,
            _PlayerHeight / 2,
            _PlayerWidth / 2
            );
    }
 // Use this for initialization
 void Awake()
 {
     if (reference == null)
     {
         reference = GetComponent <scr_Stats>();
     }
     if (reference == null)
     {
         Destroy(this);
     }
     if (tm)
     {
         tm.text = reference.Name;
     }
 }
示例#5
0
 void Start()
 {
     stats = gameObject.GetComponent <scr_Stats>();
     _Stub.SetActive(false);
     _FelledBody.SetActive(false);
 }