예제 #1
0
 public InteractiveObjectTargettedVisualFeedback(PlayerAimingInteractiveObjectActionInherentData PlayerAimingInteractiveObjectActionInherentData, Camera mainCamera)
 {
     this.InteractiveObjectTargettedVisualFeedbackObject = new InteractiveObjectTargettedVisualFeedbackObject(
         new InteractiveObjectTargettedVisualFeedbackGameObject(null, PlayerAimingInteractiveObjectActionInherentData.InteractiveObjectTargettedVisualFeedbackPrefab),
         new InteractiveObjectTargettedVisualFeedbackObjectDefinition(PlayerAimingInteractiveObjectActionInherentData.InteractiveObjectTargettedVisualFeedbackAnimation));
     this.mainCamera = mainCamera;
     this.CurrentlyTargettedInteractiveObject = new ObjectVariable <CoreInteractiveObject>(this.OnCurrentSelectedInteractiveObjectChanged);
     this.Tick(0f);
 }
예제 #2
0
        public FiringPlayerActionTargetSystem(PlayerAimingInteractiveObjectActionInherentData playerAimingInteractiveObjectActionInherentDataRef, CoreInteractiveObject firingInteractiveObject, TargetCursorManager targetCursorManagerRef)
        {
            this._targetCursorManagerRef     = targetCursorManagerRef;
            this.FiringInteractiveObject     = firingInteractiveObject;
            this.TargetPlaneGameObject       = GameObject.Instantiate(playerAimingInteractiveObjectActionInherentDataRef.FiringHorizontalPlanePrefab);
            this.TargetPlaneGameObject.layer = LayerMask.NameToLayer(LayerConstants.FIRING_ACTION_HORIZONTAL_LAYER);
            this.DottedVisualFeeback         = GameObject.Instantiate(playerAimingInteractiveObjectActionInherentDataRef.GroundConeVisualFeedbackPrefab);

            /// Until it's first update, the DottedVisualFeeback is set far away from screen.
            this.DottedVisualFeeback.transform.position = new Vector3(99999f, 99999f, 99999f);

            this.CurrentlyTargettedInteractiveObject = new ObjectVariable <CoreInteractiveObject>(this.OnCurrentlyTargettedInteractiveObjectChange);
        }
예제 #3
0
        public PlayerAimingInteractiveObjectAction(ref FiringInteractiveObjectActionInput firingInteractiveObjectActionInput) :
            base(firingInteractiveObjectActionInput.PlayerAimingInteractiveObjectActionInherentData.coreInteractiveObjectActionDefinition)
        {
            this.FiringInteractiveObject = firingInteractiveObjectActionInput.firingInteractiveObject;

            var gameInputManager = GameInputManager.Get();

            this._playerAimingInteractiveObjectActionInherentData = firingInteractiveObjectActionInput.PlayerAimingInteractiveObjectActionInherentData;

            this.FiringPlayerActionTargetSystem           = new FiringPlayerActionTargetSystem(this._playerAimingInteractiveObjectActionInherentData, this.FiringInteractiveObject, TargetCursorManager.Get());
            this.PlayerObjectOrientationSystem            = new PlayerObjectOrientationSystem(this.FiringInteractiveObject as IPlayerInteractiveObject, this.FiringPlayerActionTargetSystem);
            this.InteractiveObjectTargettedVisualFeedback = new InteractiveObjectTargettedVisualFeedback(firingInteractiveObjectActionInput.PlayerAimingInteractiveObjectActionInherentData, Camera.main);

            this.ExitActionSystem = new ExitActionSystem(gameInputManager);

            this._firingLockSelectionSystem = new FiringLockSelectionSystem(this.OnInteractiveObjectTargetted);


            /// Initialisation of states
            this.Tick(0f);
            this.AfterTicks(0f);
        }