Esempio n. 1
0
    private void OnCurrentActorUpdated()
    {
        if (currentActor == null)
        {
            return;
        }
        Camera.main.GetComponent <CameraFollow360>().player = currentActor.transform;
        if (beautifySettings)
        {
            beautifySettings.depthOfFieldTarget = currentActor.transform;
        }

        // TODO: Refactor
        jumpCommand        = new JumpCommand(currentActor);
        kickCommand        = new KickCommand(currentActor);
        punchCommand       = new PunchCommand(currentActor);
        moveForwardCommand = new MoveForwardCommand(currentActor);
    }
Esempio n. 2
0
        // Start is called before the first frame update
        protected override void Start()
        {
            base.Start();
            Name = "Выживший";
            var punch = new PunchCommand(this);

            CommandInfos[0] = new CommandInfo()
            {
                button = MoveButton, command = Move
            };
            CommandInfos[1] = new CommandInfo()
            {
                button = MeleeAttackButton, command = punch
            };


            Commands.Add(punch);
            RefreshAll();
            CurrentCommand = Move;
        }