Exemplo n.º 1
0
        /// <summary>
        /// Fails the mission if the VIP dies
        /// </summary>
        /// <param name="npc">Npc.</param>
        public override void DestroyNpc(Npc npc)
        {
            TargetNpc target = npc as TargetNpc;

            if (target != null)
            {
                if (target.isPrimaryObjective)
                {
                    Failed();
                }
            }
        }
Exemplo n.º 2
0
        /// <summary>
        /// Game is failed when the primary target enters the zone
        /// </summary>
        /// <param name="zoneObject">Zone object.</param>
        public override void EntersZone(GameObject zoneObject, TargetZone zone)
        {
            TargetNpc target = zoneObject.GetComponent <TargetNpc>();

            if (target == null)
            {
                return;
            }

            if (target.isPrimaryObjective)
            {
                Failed();
            }
        }
Exemplo n.º 3
0
        /// <summary>
        /// Awards the achievement if the main target dies, but escort target does not.
        /// </summary>
        /// <param name="npc">Npc.</param>
        public override void DestroyNpc(Npc npc)
        {
            TargetNpc target = npc as TargetNpc;

            if (target != null)
            {
                if (!target.isPrimaryObjective)
                {
                    m_FailedObjective = true;
                }

                if (target.isPrimaryObjective && !m_FailedObjective)
                {
                    Achieved();
                }
            }
        }
Exemplo n.º 4
0
 public bool IsValidTarget()
 {
     return(TargetNpc != null && TargetNpc.IsValid());
 }