示例#1
0
    //Unique methods
    public Shard NewShard()
    {
        ASTNodeMonoShard sgo = Instantiate(ShardPrefab, Vector3.zero, Quaternion.identity).GetComponent <ASTNodeMonoShard>();

        sgo.Initialize();
        Shard s = sgo.shard;

        s.CreateMainMethods();
        s.transform.parent = transform;
        s.Move(DefaultLocation);
        Shards.AddNode(s);
        SelectShard(s);
        return(s);
    }
示例#2
0
    public override bool Invoke()
    {
        if (!receivingFromOwnBreak)
        {
            receivingFromOwnBreak = true;
            return(true);
        }
        Debug.Log("Invoke SetColorSigil");
        Shard s = FindShard();

        if (s is null)
        {
            Debug.Log("Couldn't find Shard for instruction :(");
        }
        s.Move(new Vector3(x.Value, y.Value, z.Value));
        Debug.Log("Moving shard to " + s.transform.Find("Model").position.ToString());
        return(false);
    }
示例#3
0
    public override bool Invoke()
    {
        if (!receivingFromOwnBreak)
        {
            receivingFromOwnBreak = true;
            return(true);
        }
        Debug.Log("Invoke MoveAboutSigil");
        Shard s = FindShard();

        if (s is null)
        {
            Debug.Log("Couldn't find Shard for instruction :(");
        }
        Vector3 center     = new Vector3(x.Value, y.Value, z.Value);
        Vector3 centerline = s.Position() - center;

        Debug.Log(s.Position());
        Debug.Log(centerline);
        if (axis.Value == 0)
        {
            centerline = Quaternion.Euler(amount.Value, 0, 0) * centerline;
        }
        else if (axis.Value == 1)
        {
            centerline = Quaternion.Euler(0, amount.Value, 0) * centerline;
        }
        else if (axis.Value == 2)
        {
            centerline = Quaternion.Euler(0, 0, amount.Value) * centerline;
        }
        Debug.Log(centerline);
        s.Move(center + centerline);
        Debug.Log("Moving shard to " + s.transform.Find("Model").position.ToString());
        return(false);
    }