Beispiel #1
0
 private void EnsureInit()
 {
     if (health != null)
     {
         return;
     }
     health         = GetComponent <LivingHealthBehaviour>();
     uprightSprites = GetComponent <UprightSprites>();
 }
Beispiel #2
0
 private void Awake()
 {
     base.Awake();
     playerScript      = GetComponent <PlayerScript>();
     uprightSprites    = GetComponent <UprightSprites>();
     playerDirectional = GetComponent <Directional>();
     playerDirectional.ChangeDirectionWithMatrix = false;
     uprightSprites.spriteMatrixRotationBehavior = SpriteMatrixRotationBehavior.RemainUpright;
     spriteRenderers = GetComponentsInChildren <SpriteRenderer>();
 }
 protected override void Awake()
 {
     base.Awake();
     AddStatus(this);
     playerScript      = GetComponent <PlayerScript>();
     uprightSprites    = GetComponent <UprightSprites>();
     playerDirectional = GetComponent <Directional>();
     playerDirectional.ChangeDirectionWithMatrix = false;
     uprightSprites.spriteMatrixRotationBehavior = SpriteMatrixRotationBehavior.RemainUpright;
 }
Beispiel #4
0
 protected virtual void Awake()
 {
     mobFollow      = GetComponent <MobFollow>();
     mobExplore     = GetComponent <MobExplore>();
     mobFlee        = GetComponent <MobFlee>();
     health         = GetComponent <LivingHealthBehaviour>();
     dirSprites     = GetComponent <NPCDirectionalSprites>();
     cnt            = GetComponent <CustomNetTransform>();
     registerObject = GetComponent <RegisterObject>();
     uprightSprites = GetComponent <UprightSprites>();
 }
 private void EnsureInit()
 {
     if (playerScript != null)
     {
         return;
     }
     playerScript      = GetComponent <PlayerScript>();
     uprightSprites    = GetComponent <UprightSprites>();
     playerDirectional = GetComponent <Directional>();
     playerDirectional.ChangeDirectionWithMatrix = false;
     uprightSprites.spriteMatrixRotationBehavior = SpriteMatrixRotationBehavior.RemainUpright;
     spriteRenderers = GetComponentsInChildren <SpriteRenderer>();
 }
Beispiel #6
0
 protected virtual void Awake()
 {
     simpleAnimal   = GetComponent <SimpleAnimal>();
     mobFollow      = GetComponent <MobFollow>();
     mobExplore     = GetComponent <MobExplore>();
     mobFlee        = GetComponent <MobFlee>();
     health         = GetComponent <LivingHealthBehaviour>();
     rotatable      = GetComponent <Rotatable>();
     mobSprite      = GetComponent <MobSprite>();
     cnt            = GetComponent <CustomNetTransform>();
     registerObject = GetComponent <RegisterObject>();
     uprightSprites = GetComponent <UprightSprites>();
 }
Beispiel #7
0
 void OnEnable()
 {
     health         = GetComponent <LivingHealthBehaviour>();
     uprightSprites = GetComponent <UprightSprites>();
 }