Beispiel #1
0
 public FireAuto(HumanBase _human) : base(_human)
 {
     animationSpeed = 5;
     animtionName   = "fire";
     loop           = true;
     resetScope     = true;
 }
Beispiel #2
0
    public Fall(HumanBase _human) : base(_human)
    {
        animtionName = "DieRoughShort";
        loop         = false;

        audioClipName_animationSync = "die2";
    }
Beispiel #3
0
 public Patrol(HumanBase _human) : base(_human)
 {
     animtionName         = "Walk";
     audioClipName_repeat = "npc_step1";
     audioTimerRepeat_Max = 0.5f;
     audioVolume          = 0.5f;
 }
Beispiel #4
0
    public void Fall(HumanBase humanBase, bool drown = false)
    {
        Human human = humanBase as Human;

        if (ReplayRecorder.isPlaying || NetGame.isClient)
        {
            return;
        }
        if (passedLevel && ((currentLevelNumber >= 0 && currentLevelNumber < levels.Length) || workshopLevel != null || currentLevelType == WorkshopItemSource.EditorPick))
        {
            if (ReplayRecorder.isRecording)
            {
                ReplayRecorder.Stop();
            }
            else if (workshopLevel != null)
            {
                passedLevel = false;
                PlayerManager.SetSingle();
                App.instance.PauseLeave();
                GameSave.PassCheckpointWorkshop(workshopLevel.hash, 0);
            }
            else if (currentLevelType == WorkshopItemSource.EditorPick)
            {
                passedLevel = false;
                PlayerManager.SetSingle();
                App.instance.PauseLeave();
                if (NetGame.isLocal)
                {
                    GameSave.StartFromBeginning();
                }
                for (int i = 0; i < Human.all.Count; i++)
                {
                    Human.all[i].ReleaseGrab();
                }
            }
            else
            {
                StatsAndAchievements.PassLevel(levels[currentLevelNumber], human);
                for (int j = 0; j < Human.all.Count; j++)
                {
                    Human.all[j].ReleaseGrab();
                }
                StartCoroutine(PassLevel());
            }
        }
        else
        {
            if (drown)
            {
                StatsAndAchievements.IncreaseDrownCount(human);
            }
            else
            {
                StatsAndAchievements.IncreaseFallCount(human);
            }
            Respawn(human, Vector3.zero);
            CheckpointRespawned(currentCheckpointNumber);
        }
    }
Beispiel #5
0
    public Dead(HumanBase _human) : base(_human)
    {
        animtionName = "deactivate";
        loop         = true;
        resetScope   = true;

        audioClipName_animationSync = "die1";
    }
Beispiel #6
0
    public Shoot(HumanBase _human) : base(_human)
    {
        animtionName  = "Firing";
        enterDistance = 10;
        leaveDistance = 15;

        audioClipName_animationSync = "m4a1_unsil-1";
    }
Beispiel #7
0
 // Use this for initialization
 void Start()
 {
     Application.LoadLevelAdditive("main_ui");
     Instance        = this;
     _ui3dController = FindObjectOfType <UI3dController>();
     _zombieSquad    = FindObjectOfType <ZombieSquad>();
     _humanBase      = FindObjectOfType <HumanBase>();
     _elapsedTime    = 0f;
 }
Beispiel #8
0
    public Run(HumanBase _human) : base(_human)
    {
        moveFactor   = 2;
        animtionName = "run";
        loop         = true;
        resetScope   = true;

        audioClipName_repeat = "npc_step3";
        audioTimerRepeat_Max = 0.2f;
    }
Beispiel #9
0
    public Chase(HumanBase _human) : base(_human)
    {
        animtionName  = "RunLoop";
        enterDistance = 25;
        leaveDistance = 30;

        audioClipName_repeat = "npc_step3";
        audioTimerRepeat_Max = 0.3f;
        audioVolume          = 1f;
    }
Beispiel #10
0
    public Walk(HumanBase _human) : base(_human)
    {
        animtionName = "walking";
        loop         = true;
        resetScope   = false;

        audioClipName_repeat = "npc_step1";
        audioTimerRepeat_Max = 0.37f;
        audioVolume          = 0.5f;
    }
    void Awake()
    {
        AudioManager = GetComponent <ZombieSquadAudioManager>();
        Instance     = this;
        _zombies     = new List <Zombie>(GetComponentsInChildren <Zombie>());
        _brainDepot  = FindObjectOfType <BrainDepot>();
        if (_brainDepot == null)
        {
            Debug.LogWarning("brainDepot base is null");
        }

        _jailManager = FindObjectOfType <ZombieJailManager>();

        _humanBase = FindObjectOfType <HumanBase>();
        if (_humanBase == null)
        {
            Debug.LogWarning("human base is null");
        }

        _startTimer.WaitForSeconds(3f);
    }
Beispiel #12
0
 public virtual void Start()
 {
     myHuman = GetComponent <HumanBase>();
 }
Beispiel #13
0
 public Fire(HumanBase _human) : base(_human)
 {
     animtionName = "fire";
     loop         = false;
     resetScope   = false;
 }
Beispiel #14
0
	public Swap (HumanBase _human):base(_human)
	{
		animtionName = "deactivate";
		loop = false;
		resetScope = true;
	}
Beispiel #15
0
 public Idle(HumanBase _human) : base(_human)
 {
     animtionName = "idle";
     loop         = true;
     resetScope   = false;
 }
Beispiel #16
0
 public Reload(HumanBase _human) : base(_human)
 {
     animtionName = "reload";
     loop         = false;
     resetScope   = true;
 }
Beispiel #17
0
 public PlayerStateBase(HumanBase _human) : base(_human)
 {
     player = (Player)_human;
 }
Beispiel #18
0
 public EnemyStateBase(HumanBase _human) : base(_human)
 {
     enemy = (Enemy)_human;
 }
Beispiel #19
0
    public float timer;                                             //状态剩余时间

    public StateBase(HumanBase _human)
    {
        human = _human;
        timer = float.MinValue;
    }