示例#1
0
文件: Player.cs 项目: anddonram/CODE3
        public void SetResources()
        {
            woodAmount   = 5000;
            keysBehavior = RenderManager.ActiveCamera2D.Owner.FindComponent <KeysBehavior>();
            ui           = UIBehavior.ui;
            map          = Map.map;
            fog          = FogOfWar.fog;
            PathDrawable draw = new PathDrawable();

            draw.SetPlayer(this, path);
            Owner.AddComponent(draw);
        }
示例#2
0
        public void SetResources()

        {
            woodAmount = 5000;


            if (isLocalPlayer)
            {
                networkService = (Owner.Scene as NetworkedScene).networkService;
                keysBehavior   = RenderManager.ActiveCamera2D.Owner.FindComponent <KeysBehavior>();
                ui             = UIBehavior.ui;
                map            = Map.map;
                fog            = FogOfWar.fog;
                PathDrawable draw = new PathDrawable();
                draw.SetPlayer(this, path);
                Owner.AddComponent(draw);
            }
        }