Пример #1
0
 void Awake()
 {
     rb         = GetComponent <Rigidbody2D>();
     toes       = GetComponentInChildren <Toes>();
     animator   = transform.GetChild(0).GetComponent <Animator>();
     playerBase = GetComponentInChildren <PlayerBaseSounds>();
 }
Пример #2
0
 protected void SetupDependencies()
 {
     rb       = GetComponent <Rigidbody2D>();
     animator = GetComponentInChildren <Animator>();
     sounds   = GetComponentInChildren <PlayerBaseSounds>();
     Assert.IsNotNull(animator, "ERROR: Couldn't find component of type 'Animator' in object \"" + gameObject.name + "\" or any of its children");
     toes = GetComponentInChildren <Toes>();
     Assert.IsNotNull(toes,
                      "ERROR: Couldn't find component of type 'toes' in object \"" + gameObject.name + "\" or any of its children");
 }
Пример #3
0
 private void Start()
 {
     //animator = transform.GetChild(0).GetComponent<Animator>();
     baseSounds = GetComponentInChildren <PlayerBaseSounds>();
 }
Пример #4
0
 private void Start()
 {
     rageDollPool = GameObject.Find(("RageDollPool")).transform;
     sounds       = GetComponentInChildren <PlayerBaseSounds>();
     playerRage   = GameObject.Find("Player").GetComponent <Rage>();
 }