Esempio n. 1
0
 public void SetBalanceEntity(BaseEntity balance)
 {
     BalanceEnt = balance;
 }
Esempio n. 2
0
        public void SetParent(BaseEntity parent)
        {
            if (this.Parent != null)
                this.Parent.Children.Remove(this);

            Vector3 worldPos = this.Position;
            this.Parent = parent;

            //Get local coordinates from the parent
            if (this.Parent != null)
            {
                this.SetPos(worldPos - parent.Position);
                this.Parent.Children.Add(this);
            }
            else //Or just set us to where we are
                this.SetPos(worldPos);
        }
Esempio n. 3
0
        public static void SetSelected(BaseEntity e)
        {
            //Reset the previous selected ents color
            if (SelectedEnt != null)
            {
                SelectedEnt.Color = Vector3.One;
            }
            SelectedEnt = e;

            //Set the new entity's color
            if (SelectedEnt != null)
            {
                SelectedEnt.Color = new Vector3(0, 1.0f, 0);
            }
        }