Ejemplo n.º 1
0
    void CmdTakeDamageInManager(NetworkInstanceId netId, float damageValue)
    {
        GameObject           snakeManager         = GameObject.FindWithTag("SnakeManagerInServer");
        SnakeManagerInServer snakeManagerInServer = snakeManager.GetComponent <SnakeManagerInServer>();

        snakeManagerInServer.CmdTakeDamageInServer(netId, damageValue);
    }
Ejemplo n.º 2
0
    void CmdRemoveSnakeBodyInManager(NetworkInstanceId bodyNetId)
    {
        GameObject           snakeManagerInServer = GameObject.FindWithTag("SnakeManagerInServer");
        SnakeManagerInServer snakeManager         = snakeManagerInServer.GetComponent <SnakeManagerInServer>();
        NetworkInstanceId    thisSnakeNetId       = GetComponent <NetworkIdentity>().netId;

        snakeManager.CmdRemoveBody(thisSnakeNetId, bodyNetId);
    }
Ejemplo n.º 3
0
    void CmdSnakeManagerPrint()
    {
        print("CallCmdPrint");
        GameObject           snakeManagerInServer = GameObject.FindWithTag("SnakeManagerInServer");
        SnakeManagerInServer snakeManager         = snakeManagerInServer.GetComponent <SnakeManagerInServer>();
        NetworkInstanceId    thisSnakeNetId       = GetComponent <NetworkIdentity>().netId;

        snakeManager.CmdPrint(thisSnakeNetId);
    }
Ejemplo n.º 4
0
    void CmdUpdateSnakeManager()
    {
        GameObject           snakeManagerInServer = GameObject.FindWithTag("SnakeManagerInServer");
        SnakeManagerInServer snakeManager         = snakeManagerInServer.GetComponent <SnakeManagerInServer>();
        NetworkInstanceId    thisSnakeNetId       = GetComponent <NetworkIdentity>().netId;

        snakeManager.CmdAddSnake(thisSnakeNetId);
        snakeManager.CmdAddBody(thisSnakeNetId, new NetworkInstanceId((uint)snakeHeadNetId));
        snakeManager.CmdAddBody(thisSnakeNetId, new NetworkInstanceId((uint)snakeBodyNetId));
        snakeManager.CmdAddBody(thisSnakeNetId, new NetworkInstanceId((uint)snakeBodySecondNetId));
    }