Esempio n. 1
0
 public void SetFPLocation()
 {
     currentStageZone.Enable();
     previousStageZone = currentStageZone;
     currentStageZone  = null;
     stack.Clear();
 }
    public void SwitchFromSZ_ToSZ_DOWN(StageZone aimStageZone)
    {
        szState.Lock();

        szMemory.SetCurrentLocation(aimStageZone);
        szState.SetStageZoneParams(aimStageZone.GetStageZoneParams());

        switcher.MakeSwitchingAnimation(SwitchAnimType.SZ_TO_SZ_DOWN, aimStageZone.GetDefaultCamParams());
    }
    public void SwitchFromFP_ToSZ(StageZone aimStageZone)
    {
        stateType = PlayerStateType.StageZone;
        fpsState.Lock();

        szMemory.SetStartLocation(aimStageZone);
        szState.SetStageZoneParams(aimStageZone.GetStageZoneParams());

        switcher.MakeSwitchingAnimation(SwitchAnimType.FP_TO_SZ, aimStageZone.GetDefaultCamParams());
    }
Esempio n. 4
0
 void Start()
 {
     stageZone          = GetComponent <StageZone>();
     meshRenderer       = GetComponent <MeshRenderer>();
     playerStateManager = PlayerStateManager.Instance;
     szMemory           = SZMemory.Instance;
     if (!Options.Instance.shouldRenderStageZones)
     {
         meshRenderer.enabled = false;
     }
 }
Esempio n. 5
0
    private void SelectAnimation()
    {
        StageZone currentStageZone = szMemory.GetCurrentStageZone();

        if (currentStageZone == null)
        {
            playerStateManager.SwitchFromFP_ToSZ(stageZone);
        }
        else if (currentStageZone.isParentOf(stageZone))
        {
            playerStateManager.SwitchFromSZ_ToSZ_DOWN(stageZone);
        }
        else if (stageZone.isParentOf(currentStageZone))
        {
        }
    }
Esempio n. 6
0
    public StackInfo MakeStepUp()
    {
        //2 варианта
        StackInfo stackInfo;

        if (stack.Count == 0)
        {
            stackInfo = new StackInfo(currentStageZone.GetParent(), currentStageZone.GetParent().GetDefaultCamParams());
        }
        else
        {
            previousStageZone = currentStageZone;
            previousStageZone.Enable();
            stackInfo        = stack.Pop();
            currentStageZone = stackInfo.stageZone;
        }
        return(stackInfo);
    }
Esempio n. 7
0
 public StackInfo(StageZone stageZone, CameraParams camParams)
 {
     this.stageZone = stageZone;
     this.camParams = camParams;
 }
Esempio n. 8
0
 public void SetCurrentLocation(StageZone newStageZone)
 {
     newStageZone.Disable();
     stack.Push(new StackInfo(currentStageZone, szController.GetCameraParams()));
     currentStageZone = newStageZone;
 }
Esempio n. 9
0
 public void SetStartLocation(StageZone newStageZone)
 {
     newStageZone.Disable();
     currentStageZone = newStageZone;
 }
Esempio n. 10
0
 public void SetAimLocation(StageZone newStageZone)
 {
     aimStageZone = newStageZone;
 }
Esempio n. 11
0
 private void Awake()
 {
     stageZone = GetComponent <StageZone>();
 }
Esempio n. 12
0
 public bool isParentOf(StageZone stageZone)
 {
     return(children.Contains(stageZone));
 }