Exemplo n.º 1
0
    // Add the tank information to the visibleEntities list
    public void AddTankInfo(Tank tank)
    {
        if (visibleEntities == null)
        {
            visibleEntities = new List <ViewInfoEntity>();
        }

        ViewInfoEntity vie = new ViewInfoEntity();

        vie.entityType = ViewInfoEntityType.Tank;
        vie.position   = tank.transform.position;
        vie.forward    = tank.transform.forward;

        visibleEntities.Add(vie);
    }
Exemplo n.º 2
0
    // Add the obstacle information to the visibleEntities list
    public void AddObstacleInfo(MapObstacle obs)
    {
        if (visibleEntities == null)
        {
            visibleEntities = new List <ViewInfoEntity>();
        }

        ViewInfoEntity vie = new ViewInfoEntity();

        vie.entityType = (obs.isBreakable ? ViewInfoEntityType.DestructableObject : ViewInfoEntityType.NonDestructableObject);
        vie.position   = obs.transform.position;
        vie.forward    = obs.transform.forward;

        visibleEntities.Add(vie);
    }