public override void OnUpdate() { GetInputs(); //debug Actor.GetChild <StaticModel>().SetMaterial(0, IsGrounded ? blueMat : redMat); }
public override void OnStart() { Trigger = Trigger ?? Actor.GetChild <Collider>(); Trigger.TriggerEnter += actor => { if (actor.LayerName == "Player") { Checkpoint.Current.Load(); } }; }
public override void OnStart() { Current = Current ?? this; Trigger = Trigger ?? Actor.GetChild <Collider>(); DefaultPose = DefaultPose ?? Actor; Trigger.TriggerEnter += actor => { if (actor.LayerName == "Player") { Save(); } }; }
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; }
public override void OnStart() { cam = Actor.GetChild <Camera>(); Asou1 = Actor.GetChild <AudioSource>(); AGparameter = Actor.GetChild <AnimatedModel>().GetParameter("AniSpeed"); }