Beispiel #1
0
    //----------------------------------------------------------
    //                      CONSTRUCTORS
    //----------------------------------------------------------
    public EntityDataManager( string gameType, string marking, LVCGame.UnitForceType force )
    {
        this.lvcUnityAmbassador = LVCUnityAmbassador.GetInstance();
        this.lvcClient = lvcUnityAmbassador.GetLVCClient();

        // initialise the entity data container which will hold salient details about
        // the entity state which we want to send in LVC updates
        entityData = new LVCGame.EntityData();
        entityData.id = new LVCGame.EntityID();
        entityData.physics = new LVCGame.EntityPhysics();
        entityData.properties = new LVCGame.EntityProperties();
        entityData.properties.force = force;

        // assign a unique ID number to this entity
        entityData.id.instance = lvcUnityAmbassador.GetNextEntityID();

        // initialise types and markings
        entityData.id.gameType = gameType;
        entityData.id.marking = marking;

        lvcGameState = LVCGameState.UNINTIALISED;
    }