Beispiel #1
0
        public static RepairItem Hammer(GameObject owner)
        {
            RepairItem hammer = owner.AddComponent <RepairItem>();

            hammer.name = "Hammer";
            hammer.baseRepairStength = 5;
            hammer.useCooldown       = TimeSpan.FromMilliseconds(500);
            hammer.range             = 2;
            return(hammer);
        }
Beispiel #2
0
        public static RepairItem Nailgun(GameObject owner)
        {
            RepairItem nailgun = owner.AddComponent <RepairItem>();

            nailgun.name = "Nailgun";
            nailgun.baseRepairStength = 3;
            nailgun.useCooldown       = TimeSpan.FromMilliseconds(500);
            nailgun.range             = 6;
            return(nailgun);
        }
Beispiel #3
0
        public static RepairItem Mortar(GameObject owner)
        {
            RepairItem mortar = owner.AddComponent <RepairItem>();

            mortar.name = "Mortar";
            mortar.baseRepairStength = 20;
            mortar.useCooldown       = TimeSpan.FromMilliseconds(1000);
            mortar.range             = 2;
            return(mortar);
        }
Beispiel #4
0
        public void Start()
        {
            base.Start();
            RepairItem hammer = ItemFactory.Hammer(gameObject);

            Items.Add(hammer);
            item         = hammer;
            currentRange = hammer.range;
            // RepairItem mortar = ItemFactory.Mortar(gameObject);
            // Items.Add(mortar);
        }