Пример #1
0
 public override void OnBegin()
 {
     if (!m_supported)
     {
         return;
     }
     base.OnBegin();
     CameraComp.AddEvent(this);
 }
        public override bool Init()
        {
            player                    = engine.FindEntity(Res.Entities.Player);
            cc                        = engine.GetSingle <CameraComp>(ComponentTypes.CameraComp);
            cc.TargetToFollow         = player.GetComponent <PositionComp>().transform;
            cc.StartingPositionOffset = player.GetComponent <ShipPrefabComp>().FirstPersonCameraOffset;
            //CreateShipEntity();

            return(false);
        }
Пример #3
0
        public override bool Init()
        {
            cc       = engine.GetSingle <CameraComp>(ComponentTypes.CameraComp);
            myTF     = cc.MainCamera.transform;
            camRB    = cc.MainCamera.gameObject.GetComponent <Rigidbody>();
            targetRB = cc.TargetToFollow.gameObject.GetComponentInChildren <Rigidbody>();

            if (ParentCamera)
            {
                ParentCameraToPlayer();
                return(false);
            }
            return(true);
        }
Пример #4
0
 void Awake()
 {
     CameraComp.InitMaterials();
     Deactivate();
 }
Пример #5
0
 public void Deactivate()
 {
     CameraComp.Deactivate(this);
 }
Пример #6
0
 public void Activate()
 {
     CameraComp.Activate(this);
     mElapsedTime = 0f;
 }
Пример #7
0
 public override void Reset()
 {
     base.Reset();
     CameraComp.ResetEvent(this);
 }