Пример #1
0
 /// <summary> Initializes an entity to a starting transform. </summary>
 /// <param name="loc"> The transform to initialize to. </param>
 /// <param name="manager"> Reference to this entites manager for callbacks on death. </param>
 /// <param name="type"> The type of this entity in the manager. </param>
 /// <param name="instance"> The specific instance of this entity in the manager. </param>
 /// <param name="direction"> The direction this entity is facing at init. </param>
 internal void Init(Transform loc, EntityManager manager, int type, int instance, Enums.Direction direction)
 {
     transform.position = loc.position;
     transform.localRotation = loc.rotation;
     this.manager = manager;
     this.type = type;
     this.instance = instance;
     this.direction = direction;
     InitData();
 }
Пример #2
0
 /// <summary> Initializes an entity to a starting transform. </summary>
 /// <param name="loc"> The transform to initialize to. </param>
 /// <param name="manager"> Reference to this entites manager for callbacks on death. </param>
 /// <param name="type"> The type of this entity in the manager. </param>
 /// <param name="instance"> The specific instance of this entity in the manager. </param>
 /// <param name="direction"> The direction this entity is facing at init. </param>
 internal void Init(Transform loc, EntityManager manager, int type, int instance, Enums.Direction direction, bool isCutScene)
 {
     transform.position = loc.position;
     transform.rotation = loc.rotation;
     if (isCutScene)
         transform.localScale = loc.localScale;
     this.manager = manager;
     this.type = type;
     this.instance = instance;
     this.direction = direction;
     this.isCutScene = isCutScene;
     paused = false;
     InitData();
 }
Пример #3
0
 /// <summary> Initializes an entity to a starting transform. </summary>
 /// <param name="loc"> The transform to initialize to. </param>
 /// <param name="manager"> Reference to this entites manager for callbacks on death. </param>
 /// <param name="type"> The type of this entity in the manager. </param>
 /// <param name="instance"> The specific instance of this entity in the manager. </param>
 /// <param name="direction"> The direction this entity is facing at init. </param>
 internal void Init(Transform loc, EntityManager manager, int type, int instance, Enums.Direction direction, bool isCutScene)
 {
     transform.position = loc.position;
     transform.localRotation = loc.rotation;
     if (isCutScene)
     {
         transform.localScale = loc.localScale;
         gameObject.layer = LayerMask.NameToLayer("CutScene");
     }
     this.manager = manager;
     this.type = type;
     this.instance = instance;
     this.direction = direction;
     this.isCutScene = isCutScene;
     InitData();
 }