Exemplo n.º 1
0
 public override void InitSystems(GameManager game)
 {
     foreach (int entity in _entityList)
     {
         _transform = game.Entities.GetComponentOf<GTransform>(entity);
     }
 }
Exemplo n.º 2
0
        public static GTransform Make(int entityID, Vector3 position, Vector2 bounds)
		{
			GTransform comp = new GTransform ();
			comp.EntityID = entityID;
            comp._bounds = bounds;
            comp.FamilyID = 0;
			comp._position = position;
			return comp;
		}
Exemplo n.º 3
0
        public static GTransform Make(int entityID, Vector3 position, Vector2 bounds)
        {
            GTransform comp = new GTransform();

            comp.EntityID  = entityID;
            comp._bounds   = bounds;
            comp.FamilyID  = 0;
            comp._position = position;
            return(comp);
        }
Exemplo n.º 4
0
 private bool checkCollision(GTransform transform, Vector3 nodePos)
 {
     //Debug.Log("NodePos "  + nodePos);
     if (Mathf.Abs(transform._position.x - nodePos.x) < 0.1f &&
        Mathf.Abs(transform._position.z - nodePos.z) < 0.1f)
     {
         
         return true;
     }
     else
         return false;
 }
Exemplo n.º 5
0
 private bool checkFullCollision(GTransform transform, Vector3 nodePos)
 {
     
     if (Mathf.Abs(transform._position.x - nodePos.x) < 0.1f &&
        Mathf.Abs(transform._position.z - nodePos.z) < 0.1f &&
         Mathf.Abs((transform._position.y+ transform._bounds.y/2 +0.05f) - nodePos.y) <1.6f)
         {
             
             return true;
         }
     else
         return false;
 }