예제 #1
0
    public static int set_IsAnikiGymLevelCleared(IntPtr l)
    {
        int result;

        try
        {
            TrainingGround          trainingGround = (TrainingGround)LuaObject.checkSelf(l);
            AnikiGymLevelClearCheck anikiGymLevelClearCheck;
            int num = LuaObject.checkDelegate <AnikiGymLevelClearCheck>(l, 2, out anikiGymLevelClearCheck);
            if (num == 0)
            {
                trainingGround.IsAnikiGymLevelCleared = anikiGymLevelClearCheck;
            }
            else if (num == 1)
            {
                TrainingGround trainingGround2 = trainingGround;
                trainingGround2.IsAnikiGymLevelCleared = (AnikiGymLevelClearCheck)Delegate.Combine(trainingGround2.IsAnikiGymLevelCleared, anikiGymLevelClearCheck);
            }
            else if (num == 2)
            {
                TrainingGround trainingGround3 = trainingGround;
                trainingGround3.IsAnikiGymLevelCleared = (AnikiGymLevelClearCheck)Delegate.Remove(trainingGround3.IsAnikiGymLevelCleared, anikiGymLevelClearCheck);
            }
            LuaObject.pushValue(l, true);
            result = 1;
        }
        catch (Exception e)
        {
            result = LuaObject.error(l, e);
        }
        return(result);
    }
예제 #2
0
    public static int get_ConfigDataLoader(IntPtr l)
    {
        int result;

        try
        {
            TrainingGround trainingGround = (TrainingGround)LuaObject.checkSelf(l);
            LuaObject.pushValue(l, true);
            LuaObject.pushValue(l, trainingGround.ConfigDataLoader);
            result = 2;
        }
        catch (Exception e)
        {
            result = LuaObject.error(l, e);
        }
        return(result);
    }
예제 #3
0
    public static int constructor(IntPtr l)
    {
        int result;

        try
        {
            TrainingGround o = new TrainingGround();
            LuaObject.pushValue(l, true);
            LuaObject.pushValue(l, o);
            result = 2;
        }
        catch (Exception e)
        {
            result = LuaObject.error(l, e);
        }
        return(result);
    }
예제 #4
0
    public static int IterateAvailableTechInfos(IntPtr l)
    {
        int result;

        try
        {
            TrainingGround tg = (TrainingGround)LuaObject.checkSelf(l);
            IEnumerable <TrainingTechInfo> o = tg.IterateAvailableTechInfos();
            LuaObject.pushValue(l, true);
            LuaObject.pushValue(l, o);
            result = 2;
        }
        catch (Exception e)
        {
            result = LuaObject.error(l, e);
        }
        return(result);
    }
예제 #5
0
    public static int GetAvailableTechs(IntPtr l)
    {
        int result;

        try
        {
            TrainingGround      trainingGround = (TrainingGround)LuaObject.checkSelf(l);
            List <TrainingTech> availableTechs = trainingGround.GetAvailableTechs();
            LuaObject.pushValue(l, true);
            LuaObject.pushValue(l, availableTechs);
            result = 2;
        }
        catch (Exception e)
        {
            result = LuaObject.error(l, e);
        }
        return(result);
    }
예제 #6
0
    public static int UpdateInstantiatedData(IntPtr l)
    {
        int result;

        try
        {
            TrainingGround      trainingGround = (TrainingGround)LuaObject.checkSelf(l);
            List <TrainingTech> availableTechs;
            LuaObject.checkType <List <TrainingTech> >(l, 2, out availableTechs);
            trainingGround.UpdateInstantiatedData(availableTechs);
            LuaObject.pushValue(l, true);
            result = 1;
        }
        catch (Exception e)
        {
            result = LuaObject.error(l, e);
        }
        return(result);
    }
예제 #7
0
    public static int set_Rooms(IntPtr l)
    {
        int result;

        try
        {
            TrainingGround      trainingGround = (TrainingGround)LuaObject.checkSelf(l);
            List <TrainingRoom> rooms;
            LuaObject.checkType <List <TrainingRoom> >(l, 2, out rooms);
            trainingGround.Rooms = rooms;
            LuaObject.pushValue(l, true);
            result = 1;
        }
        catch (Exception e)
        {
            result = LuaObject.error(l, e);
        }
        return(result);
    }
예제 #8
0
    public static int AddNewLearntTech(IntPtr l)
    {
        int result;

        try
        {
            TrainingGround trainingGround = (TrainingGround)LuaObject.checkSelf(l);
            TrainingTech   tech;
            LuaObject.checkType <TrainingTech>(l, 2, out tech);
            trainingGround.AddNewLearntTech(tech);
            LuaObject.pushValue(l, true);
            result = 1;
        }
        catch (Exception e)
        {
            result = LuaObject.error(l, e);
        }
        return(result);
    }
예제 #9
0
    public static int GetRoom(IntPtr l)
    {
        int result;

        try
        {
            TrainingGround trainingGround = (TrainingGround)LuaObject.checkSelf(l);
            int            roomId;
            LuaObject.checkType(l, 2, out roomId);
            TrainingRoom room = trainingGround.GetRoom(roomId);
            LuaObject.pushValue(l, true);
            LuaObject.pushValue(l, room);
            result = 2;
        }
        catch (Exception e)
        {
            result = LuaObject.error(l, e);
        }
        return(result);
    }
예제 #10
0
    public static int GetTechLevelBySoldierId(IntPtr l)
    {
        int result;

        try
        {
            TrainingGround tg = (TrainingGround)LuaObject.checkSelf(l);
            int            soldierId;
            LuaObject.checkType(l, 2, out soldierId);
            int techLevelBySoldierId = tg.GetTechLevelBySoldierId(soldierId);
            LuaObject.pushValue(l, true);
            LuaObject.pushValue(l, techLevelBySoldierId);
            result = 2;
        }
        catch (Exception e)
        {
            result = LuaObject.error(l, e);
        }
        return(result);
    }
예제 #11
0
    public static int GetUnlearntTech(IntPtr l)
    {
        int result;

        try
        {
            TrainingGround trainingGround = (TrainingGround)LuaObject.checkSelf(l);
            int            techId;
            LuaObject.checkType(l, 2, out techId);
            TrainingTech unlearntTech = trainingGround.GetUnlearntTech(techId);
            LuaObject.pushValue(l, true);
            LuaObject.pushValue(l, unlearntTech);
            result = 2;
        }
        catch (Exception e)
        {
            result = LuaObject.error(l, e);
        }
        return(result);
    }
예제 #12
0
    void Start()
    {
        // setting up study state machine
        _SSM = GetComponent <StudyStateMachine>();

        // creating states
        StateBase entrance        = new Entrance();
        StateBase welcome         = new WaitingRoom();
        StateBase training        = new TrainingGround();
        StateBase finish          = new LevelAfterFinish();
        StateBase finalFinish     = new LevelAfterFinish();
        StateBase recreation      = new RecreationRoom();
        StateBase finalRecreation = new FinalRecreationRoom();
        StateBase breaking        = new Break();

        // creating state transitions
        entrance.AddSuccessor(welcome, "");
        welcome.AddSuccessor(training, "");

        StateBase level;
        int       i = 0;

        for (; i < _listOfLevel.Count - 1; ++i)
        {
            level = new Level(_listOfLevel[i]);
            training.AddSuccessor(level, _listOfLevel[i]);
            level.AddSuccessor(finish, "");
        }
        level = new Level(_listOfLevel[i]);
        training.AddSuccessor(level, _listOfLevel[i]);
        level.AddSuccessor(finalFinish, "");

        finish.AddSuccessor(recreation, "");
        finalFinish.AddSuccessor(finalRecreation, "");
        recreation.AddSuccessor(breaking, "");
        breaking.AddSuccessor(training, "");

        _SSM.InitAndStart(entrance);
    }