Пример #1
0
 private void EnsureInit()
 {
     if (health != null)
     {
         return;
     }
     health         = GetComponent <LivingHealthBehaviour>();
     uprightSprites = GetComponent <UprightSprites>();
 }
Пример #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>();
 }
Пример #3
0
 protected override void Awake()
 {
     base.Awake();
     AddStatus(this);
     playerScript      = GetComponent <PlayerScript>();
     uprightSprites    = GetComponent <UprightSprites>();
     playerDirectional = GetComponent <Directional>();
     playerDirectional.ChangeDirectionWithMatrix = false;
     uprightSprites.spriteMatrixRotationBehavior = SpriteMatrixRotationBehavior.RemainUpright;
 }
Пример #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>();
 }
Пример #5
0
 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>();
 }
Пример #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>();
 }
Пример #7
0
 void OnEnable()
 {
     health         = GetComponent <LivingHealthBehaviour>();
     uprightSprites = GetComponent <UprightSprites>();
 }