Example #1
0
 public override void RightClickOnMine(GameObject TargetObject)
 {
     if (TargetObject.GetComponent <ResourceNode>().canmine())
     {
         commandManager.AddCommand(Cmd_Gather.New(gameObject, TargetObject));
     }
 }
Example #2
0
    public static Cmd_Gather New(GameObject prGameObject, GameObject prMine)
    {
        Cmd_Gather newcommand = prGameObject.AddComponent <Cmd_Gather>();

        newcommand.initialMine   = prMine;
        newcommand.resourceDepot = prMine.GetComponent <ResourceNode>().depot;

        return(newcommand);
    }