Example #1
0
        public override void OnUpdate()
        {
            GetInputs();

            //debug
            Actor.GetChild <StaticModel>().SetMaterial(0, IsGrounded ? blueMat : redMat);
        }
Example #2
0
        public override void OnStart()
        {
            Trigger = Trigger ?? Actor.GetChild <Collider>();

            Trigger.TriggerEnter += actor =>
            {
                if (actor.LayerName == "Player")
                {
                    Checkpoint.Current.Load();
                }
            };
        }
Example #3
0
        public override void OnStart()
        {
            Current     = Current ?? this;
            Trigger     = Trigger ?? Actor.GetChild <Collider>();
            DefaultPose = DefaultPose ?? Actor;

            Trigger.TriggerEnter += actor =>
            {
                if (actor.LayerName == "Player")
                {
                    Save();
                }
            };
        }
Example #4
0
        public override void OnAwake()
        {
            base.OnAwake();
            collider  = Actor.GetChild <CapsuleCollider>();
            rigidBody = Actor.As <RigidBody>();

            blueMat = ColorMaterial.CreateVirtualInstance();
            blueMat.SetParameterValue("Color", Color.Blue);
            redMat = ColorMaterial.CreateVirtualInstance();
            redMat.SetParameterValue("Color", Color.Red);
            currentRotationAngles = TargetRotationAngles;

            Screen.CursorVisible = false;
            Screen.CursorLock    = CursorLockMode.Locked;
        }
Example #5
0
 public override void OnStart()
 {
     cam         = Actor.GetChild <Camera>();
     Asou1       = Actor.GetChild <AudioSource>();
     AGparameter = Actor.GetChild <AnimatedModel>().GetParameter("AniSpeed");
 }