Наследование: MegaMan.Engine.Component
Пример #1
0
        public override Component Clone()
        {
            LadderComponent copy = new LadderComponent {
                hitboxes = this.hitboxes
            };

            return(copy);
        }
Пример #2
0
        public static Effect ParseEffect(XElement node)
        {
            Effect effect = e => { };

            if (node.Value == "Grab")
            {
                effect = entity =>
                {
                    LadderComponent ladder = entity.GetComponent <LadderComponent>();
                    if (ladder != null)
                    {
                        ladder.Grab();
                    }
                }
            }
            ;
            else if (node.Value == "LetGo")
            {
                effect = entity =>
                {
                    LadderComponent ladder = entity.GetComponent <LadderComponent>();
                    if (ladder != null)
                    {
                        ladder.LetGo();
                    }
                }
            }
            ;
            else if (node.Value == "StandOn")
            {
                effect = entity =>
                {
                    LadderComponent ladder = entity.GetComponent <LadderComponent>();
                    if (ladder != null)
                    {
                        ladder.StandOn();
                    }
                }
            }
            ;
            else if (node.Value == "ClimbDown")
            {
                effect = entity =>
                {
                    LadderComponent ladder = entity.GetComponent <LadderComponent>();
                    if (ladder != null)
                    {
                        ladder.ClimbDown();
                    }
                }
            }
            ;

            return(effect);
        }
    }
Пример #3
0
 public override Component Clone()
 {
     LadderComponent copy = new LadderComponent {hitboxes = this.hitboxes};
     return copy;
 }