Example #1
0
 void SetTargetBaseAndIntel(MissionBase template)
 {
     if (template is MissionIntel)
     {
         MissionIntel intel = (MissionIntel)template;
         this.IntelPropToSteal = intel.IntelPropToSteal;
         PickUpObject          = IntelPropToSteal.GetComponent <PickUpObject>();
         //Debug.Log("Successfully casted from MissionBase to MissionIntel");
     }
     else
     {
         Debug.Log("ERROR - could not cast from MissionBase to MissionIntel!");
     }
 }
    void Awake()
    {
        missionIntel = GetComponent<MissionIntel>();
        if (missionIntel == null)
            Debug.Log("ERROR - needs to have a mission attached to template game object!");

        if (IntelToSteal == null)
            Debug.Log("ERROR - needs to assign IntelPropToSteal for " + this);

        this.chooseTarget = missionIntel.HowToChooseTarget;

        if (this.chooseTarget != HowToChooseTarget.ChooseTargetBasedOnList)
            Debug.Log("ERROR - Intel mission should use ChooseTargetBasedOnList (target = base to move intel to" + this);

        DecideHowToChooseTarget();
    }
Example #3
0
    void Awake()
    {
        missionIntel = GetComponent <MissionIntel>();
        if (missionIntel == null)
        {
            Debug.Log("ERROR - needs to have a mission attached to template game object!");
        }

        if (IntelToSteal == null)
        {
            Debug.Log("ERROR - needs to assign IntelPropToSteal for " + this);
        }

        this.chooseTarget = missionIntel.HowToChooseTarget;

        if (this.chooseTarget != HowToChooseTarget.ChooseTargetBasedOnList)
        {
            Debug.Log("ERROR - Intel mission should use ChooseTargetBasedOnList (target = base to move intel to" + this);
        }

        DecideHowToChooseTarget();
    }