示例#1
0
        void Start()
        {
            // Gets the script for the "Hexasphere" gameobject
            hexa = Hexasphere.GetInstance("Hexasphere");

            hexa.OnTileClick     += TileClick;
            hexa.OnTileMouseOver += TileMouseOver;

            // Color North in red
            int ti = hexa.GetTileAtPos(new Vector3(0, 50, 55));

            hexa.SetTileColor(ti, Color.red);

            // Color opposite tile (South) in blue
            ti = hexa.GetTileAtPolarOpposite(ti);
            hexa.SetTileColor(ti, Color.blue);

            // Color opposite tile (Horizon) in green
            ti = hexa.GetTileAtPos(new Vector3(0, 0, 5));
            hexa.SetTileColor(ti, Color.green);
        }