示例#1
0
 public override void InitSystems(GameManager game)
 {
     foreach (int entity in _entityList)
     {
         _transform = game.Entities.GetComponentOf<GTransform>(entity);
     }
 }
示例#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;
		}
示例#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);
        }
示例#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;
 }
示例#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;
 }