Example #1
0
 public MissionVO(int id, string name, MissionType missionType, int numberOfWaves)
 {
     this.id = id;
     this.name = name;
     this.missionType = missionType;
     this.numberOfWaves = numberOfWaves;
 }
Example #2
0
 public Mission(string name, MissionType mType, Blueprint requiredBP, string desc = "Unknown Signal")
 {
     missionName = name;
     missionType = mType;
     requiredBlueprint = requiredBP;
     description = desc;
 }
Example #3
0
 // Survival Mission:
 public Mission(string name, MissionType mType, Blueprint requiredBP, TileData.Types reqResource, int reqAmnt, string desc = "Unknown Signal")
 {
     missionName = name;
     missionType = mType;
     requiredBlueprint = requiredBP;
     description = desc;
     objectiveResource = reqResource;
     objectiveAmnt = reqAmnt;
 }
Example #4
0
    void OnTriggerEnter(Collider c)
    {
        if (c.gameObject.name == "GalaxyPoint")
        {
            print("GalaxyPoint Mission: " + c.GetComponent<GalaxyPoint>().mType.ToString());
            mType = (MissionType)c.GetComponent<GalaxyPoint>().mType;

            onGalaxyPoint = true;
        }
    }
Example #5
0
 public MissionScript(string MissionName, int MissionDifficulty, MissionType TypeOfMission, float MissionTimeRequired)
 {
     name = MissionName;
     difficulty = MissionDifficulty;
     missionType = TypeOfMission;
     TimeReq = MissionTimeRequired;
     TimeRemaining = TimeReq;
     expReward = difficulty * Random.Range(9,24);
     moneyReward = (difficulty * Random.Range(99, 249)) + Random.Range(0, 99);
     missionState = MissionState.inactive;
 }
Example #6
0
    //protected Player
    // Use this for initialization
    public void Awake()
    {
        gsh = GameObject.Find ("GameStateHandler").GetComponent<GameStateHandler>();
        missionType = gsh.currentMissionType;
        //target = GameObject.FindGameObjectWithTag("MissionTarget").transform;
        //playerAttributes = GameObject.FindWithTag("Player").transform.GetComponent<PlayerAttributes>();

        playerScript = GameObject.FindGameObjectWithTag("Player").GetComponent<PlayerScript>();
        playerScript.activeMissions.Add(this);
        playerScript.currentMission = this;
        missionTextString = GameObject.FindGameObjectWithTag("MissionInfo").GetComponent<Text>() as Text;
    }
 // Use this for initialization
 void Start()
 {
     int rand = Random.Range(1,100);
     if (rand <= 25){
         missionType = MissionType.Elimination;
     }
     else if (rand > 25 && rand <= 50){
         missionType = MissionType.Intel;
     }
     else {
         missionType = MissionType.None;
     }
 }
Example #8
0
 public Mission(int i, MissionType previousType)
 {
     missionTitle = "Mission " + i;
     if (i == 1 || i == 6)
         type = getMissionType(i);
     else
         type = getMissionType(i, previousType);
     difficulty = getDifficulty(i);
     setWaves();
     bonusObjective = getBonusObjective();//picks bonus
     setBonusObjective();//configures bonuses
     generateMapConfiguration();
     generateEnemies();
 }
 public Mission GetMission(MissionType mType)
 {
     if (mType == MissionType.SCIENCE)
     {
        return scienceMissions[Random.Range(0, scienceMissions.Count)];
     }
     else if (mType == MissionType.SURVIVAL)
     {
         return survivalMissions[Random.Range(0, survivalMissions.Count)];
     }
     else
     {
         return encounterMissions[Random.Range(0, encounterMissions.Count)];
     }
 }
    public MissionController(MissionType missionID)
    {
        if (missionID == MissionType.Assault) {
            enemiesList = new List<BaseEnemyAI>();
            GameObject[] enemiesGos = GameObject.FindGameObjectsWithTag("Enemy");
            foreach(GameObject go in enemiesGos){
                BaseEnemyAI enemy = go.GetComponent<BaseEnemyAI>();

                if(enemy != null)
                    enemiesList.Add(enemy);

            }
        }

        missionType = missionID;
    }
Example #11
0
        /// <summary>Initializes a new instance of the SIN Mission.</summary>
        /// <param name="id">The id.</param>
        /// <param name="shipId">The ship id.</param>
        /// <param name="startDate">The start date.</param>
        /// <param name="description">The description.</param>
        /// <param name="x">The x.</param>
        /// <param name="y">The y.</param>
        /// <param name="missionTypeEnum">The mission type enum.</param>
        /// <param name="policeNeeded">The police needed.</param>
        public MissionModel(int id, int shipId, DateTime startDate, string description, int x, int y, MissionType missionTypeEnum, int policeNeeded)
        {
            if (id != 0)
            {
                this.Id = id;
            }

            this.ShipId = shipId;
            this.StartDate = startDate;
            this.Description = description;
            this.X = x;
            this.Y = y;
            this.MissionTypeEnum = missionTypeEnum;
            if (missionTypeEnum == MissionType.Sin)
            {
                this.PoliceNeeded = policeNeeded;
            }
        }
Example #12
0
 public void MissionComplete(MissionType missionType)
 {
     // award an achievement if the player finishes all of the missions of a certain type
     // the mission is finished if it is evenly divisible by 3
     if ((int)missionType % 3 == 0) {
         switch (missionType) {
             case MissionType.ExpertRunner:
                 RecordAchievement(SocialAchievementID.ExpertRunner, 100.0f);
                 break;
             case MissionType.ExpertCoinCollector:
                 RecordAchievement(SocialAchievementID.ExpertCoinCollector, 100.0f);
                 break;
             case MissionType.ExpertPlayCount:
                 RecordAchievement(SocialAchievementID.ExpertPlayer, 100.0f);
                 break;
         }
     }
 }
Example #13
0
        /// <summary>Initializes a new instance of the HOPE Mission.</summary>
        /// <param name="id">The id.</param>
        /// <param name="shipId">The ship id.</param>
        /// <param name="description">The description.</param>
        /// <param name="startDate">The start date.</param>
        /// <param name="x">The x.</param>
        /// <param name="y">The y.</param>
        /// <param name="missionTypeEnum">The mission type enum.</param>
        /// <param name="endDate">The end date.</param>
        public MissionModel(int id, int shipId, string description, DateTime startDate, int x, int y, MissionType missionTypeEnum, DateTime endDate)
        {
            if (id != 0)
            {
                this.Id = id;
            }

            this.ShipId = shipId;
            this.Description = description;
            this.StartDate = startDate;
            this.X = x;
            this.Y = y;
            this.MissionTypeEnum = missionTypeEnum;
            if (missionTypeEnum == MissionType.Hope)
            {
                this.Approved = false;
                this.EndDate = endDate;
            }
        }
Example #14
0
 public int getMissionGoal(MissionType missionType)
 {
     return staticData.getMissionGoal(missionType);
 }
Example #15
0
        private void MissionComplete(MissionType missionType)
        {
            if (((int)missionType - 3) % 4 != 0) { // don't increment if the player has already reached the max
                int missionSet = (int)missionType / 4;
                activeMissions[missionSet] = missionType + 1;
                scoreMultiplier += scoreMultiplierIncrement;
                PlayerPrefs.SetInt(string.Format("Mission{0}", missionSet), (int)activeMissions[missionSet]);
            }

            if (OnMissionComplete != null) {
                OnMissionComplete(missionType);
            }
        }
Example #16
0
        public static Mission CreateMission(MissionType type, World world)
        {
            switch (type)
            {
                case MissionType.Junkyard:
                    Pose start = new Pose(10f, 10f, 0f);
                    Pose goal = new Pose(140f, 140f, MathHelper.PiOver2);
                    return new Mission
                    {
                        Start = start,
                        Goal = goal,
                        Environment = new RandomEnvironment(world, 200, start.Position, goal.Position),
                        AStarEpsilon = 1.1f
                    };

                case MissionType.ParkingLot:
                    return new Mission
                    {
                        //Start = new Pose(20f, 10f, 0f),
                        //Goal = new Pose(90f, 83.6f, MathHelper.PiOver2),
                        Start = new Pose(140f, 45f, -MathHelper.Pi),
                        Goal = new Pose(90f, 86.34f, -MathHelper.PiOver2),
                        Environment = new ParkingEnvironment(world),
                        AStarEpsilon = 2f
                    };
            }

            return new Mission();
        }
 public Mission(Thief theThief, MissionType mType, List<Point> pts)
 {
     thief = theThief;
     type=mType;
     targets = pts;
 }
Example #18
0
 public Mission(MissionType initType, string initMissionText)
 {
     Type = initType;
     Text = initMissionText;
 }
 public void setMissionType(MissionType missionType, String missionKey)
 {
     m_tabMission.setMissionType(missionType, missionKey);
     onChanged();
 }
Example #20
0
 public string GetMissionDescription(MissionType missionType)
 {
     return missionDescription[(int)missionType];
 }
Example #21
0
 public string GetMissionCompleteText(MissionType missionType)
 {
     return staticData.GetMissionCompleteText(missionType);
 }
Example #22
0
 public int GetMissionGoal(MissionType missionType)
 {
     return missionGoal[(int)missionType];
 }
    public void SetEnterTimes(MissionType missionType, int times, int level, bool isFoggyAbyssSuccess = false)
    {
        switch (missionType)
        {
            case MissionType.Normal:
                {
                    SetEnterNormalTimes(times, level);
                }
                break;

            case MissionType.FoggyAbyss:
                {
                    SetEnterFoggyAbyssTimes(isFoggyAbyssSuccess);
                }
                break;
        }        
    }
    /// <summary>
    /// 切换关卡类型
    /// </summary>
    /// <param name="mode"></param>
    public void ChangeMode(MissionType mode)
    {
        CurrentMode = mode;

        switch (mode)
        {
            case MissionType.Normal:
                ChangeModeToNormal();
                break;

            case MissionType.FoggyAbyss:
                ChangeModeToFoggyAbyss();
                break;
        }
    }
Example #25
0
 public void setType(MissionType type)
 {
     m_missionType = type;
 }
Example #26
0
 public string getMissionDescription(MissionType missionType)
 {
     return staticData.getMissionDescription(missionType);
 }
Example #27
0
 public string GetMissionCompleteText(MissionType missionType)
 {
     return missionCompleteText[(int)missionType];
 }
Example #28
0
    // Science Mission:
    public Mission(string name, MissionType mType, Blueprint requiredBP, int stages, string desc = "Unknown Signal")
    {
        missionName = name;
        missionType = mType;
        requiredBlueprint = requiredBP;
        description = desc;

        objectiveStages = stages;
    }
Example #29
0
 /// <summary>
 /// Adds a mission.
 /// </summary>
 /// <param name="action">Action to be performed to complete the mission</param>
 /// <param name="quantity">Amount of targets the action must be applied to.</param>
 /// <param name="what">Target of the mission.</param>
 /// <param name="type">Type of target.</param>
 /// <param name="priority">Priority of the mission.</param>
 /// <param name="isMain">If set to <c>false</c> it is a secondary mission.</param>
 /// <param name="information">Additional information for this mission (such as a description).</param>
 public void AddMission(MissionType action, uint quantity,
                        Storage.EntityType what,
                        MissionDefinition.TargetType type, uint priority,
                        bool isMain, string information)
 {
     MissionDefinition definition = new MissionDefinition();
     definition.amount = quantity;
     definition.information = information;
     definition.main = isMain;
     definition.priority = priority;
     definition.purpose = action;
     definition.target = what;
     definition.targetType = type;
     missions.Add(definition);
 }
Example #30
0
 private MissionType getMissionType(int i, MissionType t)
 {
     if (i % 5 == 0)
     {
         missionType = "Special Target Elimination";
         shortObjective = "Destroy The Boss";
         missionObjective = "Destroy the enemy capital ship before it can flee the sector and warn the nearby enemy fleet.";
         return MissionType.Boss;
     }
     float f = Random.RandomRange(0f, 1.00f);
     switch (t)
     {
         case MissionType.Elimination:
             if (f < .33f)
             {
                 missionType = "Assault The Base";
                 shortObjective = "Destroy The Space Station";
                 missionObjective = "Eliminate the enemy space station to destroy their presence in this system.";
                 return MissionType.BaseAssault;
             }
             if (f >= .33f && f < .66f)
             {
                 missionType = "Defend Ally";
                 shortObjective = "Protect The Ship";
                 missionObjective = "Defend the ship as it surveys a critical planet.";
                 return MissionType.DefendShip;
             }
             if (f >= .66f)
             {
                 missionType = "Defend World";
                 shortObjective = "Protect The Planet";
                 missionObjective = "Defend the vulnerable planet from attacking forces until they are defeated.";
                 return MissionType.DefendArea;
             }
             break;
         case MissionType.BaseAssault:
             if (f < .33f)
             {
                 missionType = "Liberate The Sector";
                 shortObjective = "Destroy All Enemies";
                 missionObjective = "Wipe out all enemies within the star system.";
                 return MissionType.Elimination;
             }
             if (f >= .33f && f < .66f)
             {
                 missionType = "Defend Ally";
                 shortObjective = "Protect The Ship";
                 missionObjective = "Defend the ship as it surveys a critical planet.";
                 return MissionType.DefendShip;
             }
             if (f >= .66f)
             {
                 missionType = "Defend World";
                 shortObjective = "Protect The Planet";
                 missionObjective = "Defend the vulnerable planet from attacking forces until they are defeated.";
                 return MissionType.DefendArea;
             }
             break;
         case MissionType.DefendArea:
             if (f < .33f)
             {
                 missionType = "Liberate The Sector";
                 shortObjective = "Destroy All Enemies";
                 missionObjective = "Wipe out all enemies within the star system.";
                 return MissionType.Elimination;
             }
             if (f >= .33f && f < .66f)
             {
                 missionType = "Defend Ally";
                 shortObjective = "Protect The Ship";
                 missionObjective = "Defend the ship as it surveys a critical planet.";
                 return MissionType.DefendShip;
             }
             if (f >= .66f)
             {
                 missionType = "Assault The Base";
                 shortObjective = "Destroy The Space Station";
                 missionObjective = "Eliminate the enemy space station to destroy their presence in this system.";
                 return MissionType.BaseAssault;
             }
             break;
         case MissionType.DefendShip:
             if (f < .33f)
             {
                 missionType = "Liberate The Sector";
                 shortObjective = "Destroy All Enemies";
                 missionObjective = "Wipe out all enemies within the star system.";
                 return MissionType.Elimination;
             }
             if (f >= .33f && f < .66f)
             {
                 missionType = "Defend World";
                 shortObjective = "Protect The Planet";
                 missionObjective = "Defend the vulnerable planet from attacking forces until they are defeated.";
                 return MissionType.DefendArea;
             }
             if (f >= .66f)
             {
                 missionType = "Assault The Base";
                 shortObjective = "Destroy The Space Station";
                 missionObjective = "Eliminate the enemy space station to destroy their presence in this system.";
                 return MissionType.BaseAssault;
             }
             break;
     }
     return MissionType.Elimination;
 }