Exemplo n.º 1
0
        protected Character(int id, string name, Hangar hangar, Faction factionId, Vector position, Spacemap spacemap,
                            Reward rewards, Clan clan = null) : base(id)
        {
            Name      = name;
            Hangar    = hangar;
            FactionId = factionId;
            Position  = position;
            Spacemap  = spacemap;
            Reward    = rewards;
            Clan      = clan;

            //Default initialization
            Moving            = false;
            OldPosition       = new Vector(0, 0);
            Destination       = position;
            Direction         = new Vector(0, 0);
            MovementStartTime = new DateTime();
            MovementTime      = 0;

            RenderRange = 2000;
            Range       = new Range {
                Character = this
            };

            Skills    = new Skilltree(this);
            Updaters  = new Updaters(this);
            Cooldowns = new CooldownsAssembly(this);

            LastCombatTime = DateTime.Now;
            if (clan == null)
            {
                Clan = Global.StorageManager.Clans[0];
            }

            Ticked += AssembleTick;
        }