예제 #1
0
    // Utils
    public void AddMissionPoint(int missionId, int targetId, int entityId = -1)
    {
        TargetType curType = MissionRepository.GetTargetType(targetId);

        if (curType == TargetType.TargetType_TowerDif)
        {
            IntVector2 mpKey            = new IntVector2(missionId, targetId);
            ISceneEntityMissionPoint mp = new SceneEntityMissionPointTowerDefence(entityId);
            mp.MissionId = missionId;
            mp.TargetId  = targetId;
            if (mp.Start())
            {
                _missionEntityPoints[mpKey] = mp;
            }
        }
        else if (curType == TargetType.TargetType_KillMonster)
        {
            IntVector2 mpKey            = new IntVector2(missionId, targetId);
            ISceneEntityMissionPoint mp = new SceneEntityMissionPointMonsterKill();
            mp.MissionId = missionId;
            mp.TargetId  = targetId;
            if (mp.Start())
            {
                _missionEntityPoints[mpKey] = mp;
            }
        }
    }