public override void OnActivate() { Vector3 vector3_1 = Vector3.get_zero(); List <GameObject> gameObjectList = new List <GameObject>(); for (int index = 0; index < this.ActorIDs.Length; ++index) { GameObject actor = EventAction.FindActor(this.ActorIDs[index]); if (!Object.op_Equality((Object)actor, (Object)null)) { vector3_1 = Vector3.op_Addition(vector3_1, actor.get_transform().get_position()); gameObjectList.Add(actor); } } if (gameObjectList.Count <= 0) { this.ActivateNext(); } else { Vector3 vector3_2 = Vector3.op_Multiply(vector3_1, 1f / (float)gameObjectList.Count); Camera main = Camera.get_main(); Transform transform = ((Component)main).get_transform(); // ISSUE: explicit reference operation // ISSUE: variable of a reference type Vector3& local = @vector3_2; // ISSUE: explicit reference operation // ISSUE: explicit reference operation (^ local).y = (__Null)((^ local).y + (double)GameSettings.Instance.GameCamera_UnitHeightOffset); Vector3 position = Vector3.op_Subtraction(vector3_2, Vector3.op_Multiply(((Component)main).get_transform().get_forward(), GameSettings.Instance.GameCamera_EventCameraDistance)); ObjectAnimator.Get((Component)main).AnimateTo(position, transform.get_rotation(), this.InterpSpeed.ToSpan(), ObjectAnimator.CurveType.EaseInOut); } }
public override void Update() { if (ObjectAnimator.Get((Component)Camera.get_main()).isMoving) { return; } this.ActivateNext(); }
public override void OnActivate(int pinID) { if (pinID != 0) { return; } if (Object.op_Inequality((Object)this.Target, (Object)null) && Object.op_Inequality((Object)this.Destination, (Object)null)) { Transform transform = this.Destination.get_transform(); ObjectAnimator.Get(this.Target).AnimateTo(transform.get_position(), transform.get_rotation(), this.Time, this.InterpolationMode); } this.ActivateOutputLinks(1); }
public override void GoToEndState() { GameObject actor = EventAction.FindActor(this.TargetID); if (Object.op_Equality((Object)actor, (Object)null)) { return; } Quaternion rotation = Quaternion.Euler(this.Rotation); this.mAnimator = ObjectAnimator.Get(actor); this.mAnimator.AnimateTo(this.Position, rotation, -1f, this.Curve); }
public override void OnActivate() { GameObject actor = EventAction.FindActor(this.TargetID); if (Object.op_Equality((Object)actor, (Object)null)) { this.ActivateNext(); } else { Quaternion rotation = Quaternion.Euler(this.Rotation); this.mAnimator = ObjectAnimator.Get(actor); this.mAnimator.AnimateTo(this.Position, rotation, this.Time, this.Curve); if (!this.Async && (double)this.Time > 0.0) { return; } this.ActivateNext(); } }
public static ObjectAnimator Get(Component component) { return(ObjectAnimator.Get(component.get_gameObject())); }