示例#1
0
    // Use this for initialization
    void Start()
    {
        StunRingMaterial = new Material(StunRingShader);
        maskGen          = GetComponent <MaskGenerator>();

        cam = GetComponent <Camera>();
    }
示例#2
0
 public MaskExperiment(int dimensions)
 {
     db = new NgonDatabase(dimensions);
     InitializeComponent();
     this.maskGenerator = new MaskGenerator(dimensions);
     this.maskGeneratorPanel.Children.Add(this.maskGenerator);
 }
示例#3
0
    void Awake()
    {
        MaskGenerator maskGenerator = new MaskGenerator();

        masks.AddRange(maskGenerator.Generate(filePathLeft, saveMask));
        masks.AddRange(maskGenerator.Generate(filePathRight, saveMask));
        Debug.Log("Invoking masks ready event.");
        masksReadyEvent.Invoke(masks);
    }
示例#4
0
        List <ulong> GetAddresses(ulong address)
        {
            string str = Convert.ToString((long)address, 2);

            char[] chars = new char[36];


            for (int i = 0; i < 36; i++)
            {
                int indexSrc = str.Length - i - 1;
                int indexDst = 36 - i - 1;
                if (indexSrc >= 0)
                {
                    chars[indexDst] = str[indexSrc];
                }
                else
                {
                    chars[indexDst] = '0';
                }

                if (_mask[indexDst] == '1')
                {
                    chars[indexDst] = '1';
                }
                else if (_mask[indexDst] == 'X')
                {
                    chars[indexDst] = 'X';
                }
            }

            List <ulong>  ret           = new List <ulong>();
            MaskGenerator maskGenerator = new MaskGenerator(new string(chars));

            do
            {
                ret.Add(Convert.ToUInt64(maskGenerator.Get(), 2));
            }while (maskGenerator.Next());


            return(ret);
        }
示例#5
0
 void Awake()
 {
     Instance = this;
 }
示例#6
0
 // Use this for initialization
 void Start()
 {
     tileManager = TileManager.Instance;
     maskGen     = MaskGenerator.Instance;
 }
示例#7
0
 void Awake()
 {
     buffs       = new BuffManager(this);
     tileManager = TileManager.Instance;
     maskGen     = MaskGenerator.Instance;
 }