Example #1
0
    public virtual bool ActivateMapPiece(bool coverActive = false)
    {
        WorldBuilder.AttachMapToNode(this);
        LocationManager.RemoveUnNeededCubes();

        if (coverActive)
        {
            NodeCover.SetActive(false); // this turns the cover off
            return(false);              // this is not a fail, this is deactivation
        }
        else
        {
            NodeCover.SetActive(true);  // this turns the cover On
            return(true);
        }
    }
Example #2
0
    public virtual bool ActivateMapPiece <T>(T nodeType, bool coverActive, GameObject cover) where T : BaseNode // turn on all map objects
    {
        _nodeCover = cover.gameObject;

        WorldBuilder.AttachMapToNode(nodeType);
        //Vector3 testLocVect = new Vector3(200, 0, 0);
        //Vector3 testRotVect = new Vector3(0, 0, 0);
        //float thrust = 5;
        //NetWorkManager.NetworkAgent.CmdTellServerToMoveWorldNode(NodeID, testLocVect, testRotVect, thrust);

        if (coverActive)
        {
            _nodeCover.SetActive(false); // this turns the cover off
            return(false);               // this is not a fail, this is deactivation
        }
        else
        {
            _nodeCover.SetActive(true);  // this turns the cover On
            return(true);
        }
    }