Ejemplo n.º 1
0
 private static void OnGameObjectParentChanged(GameObjectParentChangedEventArgs args)
 {
     if (GameObjectParentChanged != null)
     {
         GameObjectParentChanged(current, args);
     }
 }
Ejemplo n.º 2
0
 private void objectManager_ParentChanged(object sender, GameObjectParentChangedEventArgs e)
 {
     if (this.IsCurrent)
     {
         OnGameObjectParentChanged(e);
     }
 }
 private void GameObj_EventParentChanged(object sender, GameObjectParentChangedEventArgs e)
 {
     if (e.NewParent != null)
     {
         parentBody = e.NewParent.GetComponent <RigidBody>();
     }
 }
Ejemplo n.º 4
0
        private void gameobj_EventParentChanged(object sender, GameObjectParentChangedEventArgs e)
        {
            if (e.OldParent != null)
            {
                if (this.parentTransform == null)
                {
                    e.OldParent.EventComponentAdded -= this.Parent_EventComponentAdded;
                }
                else
                {
                    e.OldParent.EventComponentRemoving -= this.Parent_EventComponentRemoving;
                }
            }

            if (e.NewParent != null)
            {
                this.parentTransform = e.NewParent.Transform;
                if (this.parentTransform == null)
                {
                    e.NewParent.EventComponentAdded += this.Parent_EventComponentAdded;
                }
                else
                {
                    e.NewParent.EventComponentRemoving += this.Parent_EventComponentRemoving;
                }
            }
            else
            {
                this.parentTransform = null;
            }

            this.UpdateRel();
        }
Ejemplo n.º 5
0
 public void OnParentChanged(object sender, GameObjectParentChangedEventArgs e)
 {
     if (this.ObjectManagerParentChanged != null)
     {
         this.ObjectManagerParentChanged(sender, e);
     }
 }
 protected virtual void GameObj_EventParentChanged(object sender, GameObjectParentChangedEventArgs e)
 {
     if (e.NewParent != null)
     {
         controller = e.NewParent.GetComponent <PlayerController>();
     }
 }
 protected override void GameObj_EventParentChanged(object sender, GameObjectParentChangedEventArgs e)
 {
     base.GameObj_EventParentChanged(sender, e);
     if (controller != null && controller.GamepadAvailable)
     {
         controller.gamepad.ButtonDown += Gamepad_ButtonDown;
     }
 }
Ejemplo n.º 8
0
 private void objectManager_ParentChanged(object sender, GameObjectParentChangedEventArgs e)
 {
     // Fire global event for current main scene
     if (this.IsCurrent && GameObjectParentChanged != null)
     {
         GameObjectParentChanged(current, e);
     }
 }
Ejemplo n.º 9
0
 private void GameObj_EventParentChanged(object sender, GameObjectParentChangedEventArgs e)
 {
     FixRelativeZ();
 }
Ejemplo n.º 10
0
 private void gameobj_EventParentChanged(object sender, GameObjectParentChangedEventArgs e)
 {
     this.UpdateRel();
 }
Ejemplo n.º 11
0
 private static void Scene_GameObjectParentChanged(object sender, GameObjectParentChangedEventArgs e)
 {
     UpdateLayout(e.OldParent);
     UpdateLayout(e.Object);
 }
Ejemplo n.º 12
0
        private void gameobj_EventParentChanged(object sender, GameObjectParentChangedEventArgs e)
        {
            if (e.OldParent != null)
            {
                if (this.parentTransform == null)
                    e.OldParent.EventComponentAdded -= this.Parent_EventComponentAdded;
                else
                    e.OldParent.EventComponentRemoving -= this.Parent_EventComponentRemoving;
            }

            if (e.NewParent != null)
            {
                this.parentTransform = e.NewParent.Transform;
                if (this.parentTransform == null)
                    e.NewParent.EventComponentAdded += this.Parent_EventComponentAdded;
                else
                    e.NewParent.EventComponentRemoving += this.Parent_EventComponentRemoving;
            }
            else
                this.parentTransform = null;

            this.UpdateRel();
        }
Ejemplo n.º 13
0
 private static void OnGameObjectParentChanged(GameObjectParentChangedEventArgs args)
 {
     GameObjectParentChanged?.Invoke(current, args);
 }