示例#1
0
        private void StopRecording(HologramPath path)
        {
            this.hologramRecording            = false;
            recordedPaths[selectedPath].First = path;
            Minimap.Hologram = path.StartGlobalPosition;
            Owner.RemoveComponent(this);
            if (player != null)
            {
                player.AddComponent(this);
                if (PlayerMesh != null)
                {
                    player.RemoveComponent(PlayerMesh);
                    player.RemoveComponent(player.GetComponent <AnimationController>());
                }
            }

            player.LocalQuaternionRotation             = playerRotation;
            Owner.Scene.Camera.Parent                  = Owner;
            Owner.Scene.Camera.LocalPosition           = playerCameraPosition;
            Owner.Scene.Camera.LocalQuaternionRotation = playerCameraRotation;
            Owner.Scene.Camera.LocalScale              = playerCameraScale;
            if (getWeapon() != null)
            {
                getWeapon().Owner.IsVisible = true;
            }
        }
示例#2
0
 public HologramPlayback(HologramPath path, FinalizeHologramPlayback handler = null)
 {
     isRunning = false; isCrouching = false;
     Input.BindActionPress(GameAction.PLAY_HOLOGRAM, StopPlayback);
     this.path      = new HologramPath(path);
     index          = 0;
     time           = 0.0f;
     overallTime    = 0.0f;
     durationOfStep = path.Duration / (float)path.NumberOfSteps;
     this.handler   = handler;
 }
示例#3
0
        public HologramPath(HologramPath other)
        {
            Duration            = other.Duration;
            NumberOfSteps       = other.NumberOfSteps;
            StartGlobalPosition = other.StartGlobalPosition;
            StartGlobalRotation = other.StartGlobalRotation;
            LocalPositions      = new List <Vector3>(other.LocalPositions);
            LocalRotations      = new List <float>(other.LocalRotations);
            Actions             = new List <Pair <Pair <float, float?>, Pair <GameAction, bool> > >();
            foreach (Pair <Pair <float, float?>, Pair <GameAction, bool> > action in other.Actions)
            {
                Pair <Pair <float, float?>, Pair <GameAction, bool> > newAction = new Pair <Pair <float, float?>, Pair <GameAction, bool> >(
                    new Pair <float, float?>(action.First.First, action.First.Second),
                    new Pair <GameAction, bool>(action.Second.First, action.Second.Second));

                Actions.Add(newAction);
            }
        }