コード例 #1
0
    public virtual void Init(double in_id)
    {
        id = in_id;

        connectedNode = NodeManager.CreateNode();
        int idx = UnityEngine.Random.Range(0, GameManager.gameOptions.nodeMemoryLength);

        MemoryBlock memory = connectedNode.GetMemory(idx);

        memory.SetContent(0, "READCON");
        memory.SetContent(1, id);

        memory = connectedNode.GetMemory(idx + 1);
        memory.SetContent(0, "JMP");
        memory.SetContent(1, idx);

        connectedNode.instructionQueue.Enqueue(new EnqueuedInstruction(connectedNode, idx));
        connectedNode.AddLabel(idx, "READC");

        NodeGraphicScript graphic = NodeGraphicManager.DisplayNode(Vector3.zero, connectedNode);

        cameraFocus.MoveTo(graphic);

        SetStaticValues();

        // XXX: Temporary code for local admin + non-admin
        GameManager.playerConsole = id;
        GameManager.activeConsole = id;
    }