Ejemplo n.º 1
0
 public void HoldFire()
 {
     AimLine.SetActive(false);
     holsterPivot.rotation = crossHair.rotation;
     Pistol.transform.SetParent(holsterPivot.transform.GetChild(0));
     Pistol.transform.localScale    = Vector3.one;
     Pistol.transform.localPosition = Vector3.zero;
     Pistol.transform.DOLocalRotate(new Vector3(0, 0, 0), 0.15f, RotateMode.Fast).SetEase(Ease.Linear);
     holsterPivot.DOLocalRotate(new Vector3(0, -180, 0), 0.15f, RotateMode.Fast).SetEase(Ease.Linear).OnComplete(() =>
     {
         MovePlayer();
     });
 }
Ejemplo n.º 2
0
 public void TakeAim()
 {
     holsterPivot.DOLocalRotate(crossHair.localRotation.eulerAngles, 0.15f, RotateMode.Fast).SetEase(Ease.Linear).OnComplete(() =>
     {
         Pistol.transform.SetParent(crossHair.transform.GetChild(0));
         Pistol.transform.localScale    = Vector3.one;
         Pistol.transform.localPosition = Vector3.zero;
         Pistol.transform.DOLocalRotate(new Vector3(0, 0, 0), 0.15f, RotateMode.Fast).SetEase(Ease.Linear).OnComplete(() =>
         {
             AimLine.SetActive(true);
             isFired = false;
         });
     });
 }
Ejemplo n.º 3
0
    public void PlayDead()
    {
        AimLine.SetActive(false);
        Pistol.SetActive(false);
        GameManager.gameState = "Result";

        playerMesh.DOMove(deadPosition.position, 0.5f, false).OnComplete(() =>
        {
            mainCam.DOMove(PathSpawner.instance.levelBlocks[0].GetComponent <LevelProperties>().Enemies[0].endCamPoint.position, 0.3f);
            mainCam.DORotate(PathSpawner.instance.levelBlocks[0].GetComponent <LevelProperties>().Enemies[0].endCamPoint.rotation.eulerAngles, 0.1f);
        });
        playerMesh.DORotate(deadPosition.rotation.eulerAngles, 0.3f, RotateMode.Fast);
        GameManager.instance.DelayedReload(3);
    }