public void OnTriggerEnter(Collider other) { Pliers p = other.gameObject.GetComponent <Pliers>(); if (p) { pliers = p; } }
public ToolBase CreateNewTool(E__ToolBoxTool newTool, UIViewController _vcWorkSpace) { switch (newTool) { case E__ToolBoxTool.Hammerz: { var _newTool = new Game1(); //game.Run(); //var _newTool = new Game1(); this.SetGameView(_newTool); return(_newTool); } case E__ToolBoxTool.Plierz: { var _newTool = new Pliers(); return(_newTool); } case E__ToolBoxTool.ScrewDriverz: { var _newTool = new Hammer(); return(_newTool); } case E__ToolBoxTool.SideCutterz: { var _newTool = new Hammer(); return(_newTool); } default: { var _newTool = new Hammer(); return(_newTool); } } }
public PliersAsHammer(Pliers pliers) { _pliers = pliers; }