コード例 #1
0
    public override void CopyValues(ScrObjLibraryEntry other)
    {
        base.CopyValues(other);
        MissionEntry mission = (MissionEntry)other;

        mapLocation    = mission.mapLocation;
        mapDescription = mission.mapDescription;

        maps = new List <MapEntry>();
        for (int i = 0; i < mission.maps.Count; i++)
        {
            maps.Add(mission.maps[i]);
        }
        squads = new List <SquadGroup>();
        for (int i = 0; i < mission.squads.Count; i++)
        {
            squads.Add(mission.squads[i]);
        }

        duration       = mission.duration;
        unlockReq      = mission.unlockReq;
        unlockDay      = mission.unlockDay;
        squadSize      = mission.squadSize;
        characterReq   = mission.characterReq;
        clearedMission = mission.clearedMission;

        reward = mission.reward;
    }
コード例 #2
0
ファイル: OpenVault.cs プロジェクト: cheemis/AHiestToDieFor
 public void OnCollisionEnter(Collision other)
 {
     // if other is player             if havent started    if another isnt already
     if (other.gameObject.tag == "Player" && unloaded == null && !isCracking)
     {
         playerUnlocking = other.gameObject.GetComponent <Unlocking>();
         navMeshAgent    = other.gameObject.GetComponent <UnityEngine.AI.NavMeshAgent>();
         unloaded        = Instantiate(loadingPrefab, FindObjectOfType <Canvas>().transform).GetComponent <Image>();
         loaded          = new List <Image>(unloaded.GetComponentsInChildren <Image>()).Find(img => img != unloaded);
     }
     else if (other.gameObject.tag == "Player" && !isCracking)
     {
         playerUnlocking = other.gameObject.GetComponent <Unlocking>();
         navMeshAgent    = other.gameObject.GetComponent <UnityEngine.AI.NavMeshAgent>();
     }
 }
コード例 #3
0
    public override void ResetValues()
    {
        base.ResetValues();
        mapLocation    = MapLocation.UNKNOWN;
        mapDescription = "";

        squads = new List <SquadGroup>();
        maps   = new List <MapEntry>();

        duration       = 1;
        unlockReq      = Unlocking.TIME;
        unlockDay      = 1;
        unlockDay      = 99;
        characterReq   = null;
        clearedMission = null;

        reward = new Reward();
    }
コード例 #4
0
ファイル: OpenVault.cs プロジェクト: cheemis/AHiestToDieFor
 public void OnCollisionExit(Collision other)
 {
     navMeshAgent    = null;
     isCracking      = false;
     playerUnlocking = null;
 }